Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER SCRIPT STEPS REFERENCE 36
Example 1
Creates a related record by using a local variable to copy information into a match field.
Set Variable [$CURRENT_CUSTOMER_ID; Value: Customers::Customer ID]
Go to Layout ["Invoice Details"]
New Record/Request
Set Field [Invoices::Customer ID; $CURRENT_CUSTOMER_ID]
Example 2
Uses a local variable to save records as Excel or PDF files in the Documents folder.
Show Custom Dialog ["Save the current record as Excel or PDF?"]
If [Get ( LastMessageChoice ) = 1]
Set Variable [$PATH; Value: Get ( DocumentsPath ) & "Invoice " &
Invoice::Invoice Number & ".xlsx"]
Save Records as Excel [Restore; "$PATH"; Current record]
Else
Set Variable [$PATH; Value: Get ( DocumentsPath ) & "Invoice " &
Invoice::Invoice Number & ".pdf"]
Save Records as PDF [Restore; "$PATH"; Current record"]
End If
Example 3
Uses global variable as a toggle to stop a script from being triggered.
Script: Go to Selected Invoice for iOS
Set Variable [$$SCRIPT_TRIGGER; Value: "Off"]
Go to Layout ["Invoice Details iPad"]
Script: Trigger Entering Invoice Details
If [$$SCRIPT_TRIGGER = "Off"]
Set Variable [$$SCRIPT_TRIGGER; Value: "On"]
Exit Script [ ]
End If
Find Matching Records [Replace; Invoices::Customer Name]
Go to Record/Request/Page [First]