Script Steps Reference

Table Of Contents
Control script steps
F
ILEMAKER PRO SCRIPT STEPS REFERENCE 16
Example 1
Runs a script on the server and sends the current layout name, customer ID, and customer email
address as the script parameter. The server navigates to the layout and record specified in the
parameter, saves a snapshot link of the current record, emails the snapshot link to the email address
specified in the parameter, and returns a result. The client fetches the script result from the server
and displays it in a custom dialog box.
Main script: Email snapshot link (Client)
Perform Script on Server [Wait for completion; "Email snapshot link
(Server)"; Parameter: List ( Get ( LayoutName ) ; Customers::ID ;
Customers::Email )]
Show Custom Dialog [Get ( ScriptResult )]
Sub-script: Email snapshot link (Server)
Go to Layout [GetValue ( Get ( ScriptParameter ) ; 1 )]
Enter Find Mode [Pause: Off]
Set Field [Customers::ID; GetValue ( Get ( ScriptParameter ) ; 2 )]
Perform Find [ ]
Set Variable [$PATH; Value:Get ( TemporaryPath ) & "Snapshot.fmpsl"]
Save Records as Snapshot Link ["$PATH"; Current record]
Send Mail [Send via SMTP Server; With dialog: Off; To: GetValue ( Get (
ScriptParameter ) ; 3 ); "$PATH"]
Exit Script [Text Result: "Snapshot link sent."]