API – Execute an Action Script
action – script
An Action Script can be evaluated against a specific record or, if the content of the script allows, without specifying a record first.
Action Script on a Specific Record
Use the action script and specify a record. The script contained in script will be evaluated against the record.
Action Script not on a Specific Record
Returning Variables From an Action Script
It is possible to set variable values during evaluation of an ActionScript. The values of these variables are returned in data. All variable names are returned in lower-case – variable names are not case-sensitive within scripts.
Note that this is an extremely flexible way to calculate and extract information of any complexity from a PYXI application. You can use the full power of the scripting language to evaluate multiple records, perform calculations etc and have all the variable values returned through this API call.
Action Script with Data Provided in call
Similar to templates, Action Scripts can act on data passed in the API call. This data overrides what would otherwise be evaluated using the variable name (if anything).
Note that this is, of course, an over-simplified example to demonstrate basic syntax. In practice, if you just needed to add a single record like this, you would use the Add Record API call instead so you get the record id back in the response.
Other API Help Pages
ActionsRead a Record | Update a Record | Add a Record | List Records | Evaluate a Template | Execute an Action Script | Apply a Blueprint | Get a Blueprint | Add a File | Get a File | Get/Set a Config Value | Get Category Values | Get Group Memberships of a User | Get Members of a Group | Load Data | Get Metadata for a Record Type | Get Metadata on Calculation Functions | Trigger an Event | Get Usage Statistics | Validate a Calculation | Validate a Filter Expression
Discussion TopicsLinking Records | Automation – Rules and Events
Return to Developer Help