Script Steps Reference
Table Of Contents
- Contents
- About script steps
- Script steps reference (alphabetical list)
- Control script steps
- Perform Script
- Pause/Resume Script
- Exit Script
- Halt Script
- If
- Else If
- Else
- End If
- Loop
- Exit Loop If
- End Loop
- Allow User Abort
- Set Error Capture
- Set Variable
- Install OnTimer Script
- Navigation script steps
- Go to Layout
- Go to Record/Request/Page
- Go to Related Record
- Go to Portal Row
- Go to Object
- Go to Field
- Go to Next Field
- Go to Previous Field
- Enter Browse Mode
- Enter Find Mode
- Enter Preview Mode
- Editing script steps
- Fields script steps
- Set Field
- Set Field By Name
- Set Next Serial Value
- Insert Text
- Insert Calculated Result
- Insert From Index
- Insert From Last Visited
- Insert Current Date
- Insert Current Time
- Insert Current User Name
- Insert Picture
- Insert QuickTime
- Insert Object (Windows)
- Insert File
- Update Link (Windows)
- Replace Field Contents
- Relookup Field Contents
- Export Field Contents
- Records script steps
- New Record/Request
- Duplicate Record/Request
- Delete Record/Request
- Delete Portal Row
- Delete All Records
- Open Record/Request
- Revert Record/Request
- Commit Records/Requests
- Copy Record/Request
- Copy All Records/Requests
- Import Records
- Export Records
- Save Records As Excel
- Save Records As PDF
- Save Records As Snapshot Link
- Found Sets script steps
- Windows script steps
- Files script steps
- Accounts script steps
- Spelling script steps
- Open Menu Item script steps
- Miscellaneous script steps
FILEMAKER SCRIPT STEPS REFERENCE 160
Examples
The following example of a manual SQL statement entry executes once each time you run the
Execute SQL script step.
INSERT INTO Employees (EmployeeID, FirstName, LastName, Title,
WorkPhone, Salary) VALUES (100, N'Joe', N'Smith', N'Software
Engineer', '987-7000', 100000)
UPDATE Employees SET Title = N'Manager' WHERE EmployeeID = 103
DELETE FROM Employees WHERE EmployeeID = 103
The following example of a field-based SQL statement shows a calculation field that concatenates
text with a field that can be used to insert or update a number of records in the found set.
"INSERT INTO Employees (EmpID, LastName) Values (" & EmpID & "," & "N'" &
Last Name & "')"
With EmpID of 103 and Lastname of "Smith" the calculation of the field above is translated to:
INSERT INTO Employees (EmpID, LastName) Values (103,N'Smith')
Note Because Microsoft SQL Server supports both Unicode and non-Unicode field types, you must
prefix all Unicode strings with an uppercase “N” (which stands for “National” in the SQL-92
standard). Otherwise, when a Unicode string containing non-English characters is passed to
Microsoft SQL Server, you may lose any data that doesn’t exist in the Microsoft SQL Server code
page.
Some Database Management Systems (DBMS), such as the MySQL 3.51 driver, don’t support the
“N” prefix. For more information, see the manual for your DBMS.
Related topics
Script steps reference (alphabetical list)
Contents
Send Event (Mac OS)
Purpose
Sends an Apple event to another application, called the target application.
Format
Send Event ["<Target Application>"; "<Event Class>"; "<Event ID>",
"<Document or Calculation or Script Text>"]
Options
Click Specify to display the “Send Event” Options dialog box, where you can set the following
options.
• Send the <value> event with lets you choose between the following:
• open application tells FileMaker Pro to open an application. Click Specify Application
to select the application.
• open document tells FileMaker Pro to open a document in the target application. You
can also specify a calculated value or script.