Returns the script result from a performed sub-script.
Get ( ScriptResult )
Data type returned
text, number, date, time, timestamp, container
Originated in version
Use this function as part of a calculation evaluated within a script. If a sub-script doesn’t return a result, then the contents of the script result will either be empty or the value of any previous sub-script result. To control the value of a sub-script result, use the Exit Script script step in the sub-script and specify a result.
In the following example, the Find Customers script returns the results of a find request when it is called from the Do Reports script. Script Find Customers uses the optional script result of the Exit Script script step. Script Do Reports then uses Get(ScriptResult) to determine what other script steps should be performed based on the returned result stored in Get(ScriptResult).
Set Error Capture [On]
Perform Find [Restore]
Exit Script [Text Result: Get(FoundCount) < 10]
Perform Script [ Specified: From list ; "Find Customers" ;
If [Get(ScriptResult) = 0]
Show Custom Dialog ["You have created 10 records already."]