Get(ScriptResult)
Purpose
Returns the script result from a performed sub-script.
Format
Get(ScriptResult)
Parameters
None
Data type returned
text, number, date, time, timestamp, container
Originated in
FileMaker Pro 8.0
Description
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.
Examples
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).
Find Customers
Set Error Capture [On]
Perform Find [Restore]
New Record/Request
Exit Script [Text Result: Get(FoundCount) < 10]
Do Reports
Perform Script [Find Customers]
If [Get(ScriptResult) = 0]
Show Custom Dialog [“You have created 10 records already.”]
End If
Related topics