Filemaker Pro 15 Script Steps Reference File Maker Fmp15 Scripts Ref

User Manual: filemaker FileMaker Pro 15 - Script Steps Reference Free User Guide for FileMaker Software, Manual

Open the PDF directly: View PDF PDF.
Page Count: 306 [warning: Documents this large are best viewed by clicking the View PDF Link!]

FileMaker® Pro 15
Script Steps Reference
© 2007–2016 FileMaker, Inc. All Rights Reserved.
FileMaker, Inc.
5201 Patrick Henry Drive
Santa Clara, California 95054
FileMaker and FileMaker Go are trademarks of FileMaker, Inc. registered in the U.S. and other countries. The file folder logo
and FileMaker WebDirect are trademarks of FileMaker, Inc. All other trademarks are the property of their respective owners.
FileMaker documentation is copyrighted. You are not authorized to make additional copies or distribute this documentation
without written permission from FileMaker. You may use this documentation solely with a valid licensed copy of FileMaker
software.
All persons, companies, email addresses, and URLs listed in the examples are purely fictitious and any resemblance to
existing persons, companies, email addresses, or URLs is purely coincidental. Credits are listed in the Acknowledgments
documents provided with this software. Mention of third-party products and URLs is for informational purposes only and
constitutes neither an endorsement nor a recommendation. FileMaker, Inc. assumes no responsibility with regard to the
performance of these products.
For more information, visit our website at http://www.filemaker.com.
Edition: 01
Contents
FILEMAKER PRO SCRIPT STEPS REFERENCE 3
Contents
Script steps reference (alphabetical list) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Creating scripts to automate tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Using this script steps reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Learning about scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Control script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Perform Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Perform Script On Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Pause/Resume Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exit Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Halt Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Else If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
End If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Exit Loop If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
End Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Allow User Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Set Error Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Set Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Set Layout Object Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Install OnTimer Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Navigation script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Go to Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Go to Record/Request/Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Go to Related Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Go to Portal Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Go to Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Go to Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Go to Next Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Go to Previous Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Close Popover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Enter Browse Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Enter Find Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Enter Preview Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Editing script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Undo/Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Set Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Select All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Perform Find/Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Contents
FILEMAKER PRO SCRIPT STEPS REFERENCE 4
Fields script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Set Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Set Field By Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Set Next Serial Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Insert Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Insert Calculated Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Insert From Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Insert From Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Insert From Last Visited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Insert From URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Insert Current Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Insert Current Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Insert Current User Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Insert Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Insert Audio/Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Insert PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Insert File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Replace Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Relookup Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Export Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Records script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
New Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Duplicate Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Delete Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Delete Portal Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Delete All Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Open Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Revert Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Commit Records/Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Copy Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Copy All Records/Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Import Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Export Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Save Records As Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Save Records As PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Save Records As Snapshot Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Truncate Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Found Sets script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Perform Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Perform Quick Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Constrain Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Extend Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Modify Last Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Show All Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Show Omitted Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Omit Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Omit Multiple Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Sort Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Sort Records by Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Unsort Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Find Matching Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Contents
FILEMAKER PRO SCRIPT STEPS REFERENCE 5
Windows script steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
New Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Select Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Close Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Adjust Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Move/Resize Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Arrange All Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Freeze Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Refresh Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Scroll Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Show/Hide Menubar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Show/Hide Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Show/Hide Text Ruler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Set Allowed Orientations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Set Window Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Set Zoom Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
View As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Files script steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
New File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Open File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Close File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Convert File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Set Multi-User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Set Use System Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Save a Copy as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Recover File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Print Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Accounts script steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Add Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Delete Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Reset Account Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Change Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Enable Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Re-Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Spelling script steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Check Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Check Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Check Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Correct Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Spelling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Select Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Edit User Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Open Menu Item script steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Open Edit Saved Finds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Open Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Open File Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Open Manage Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Open Manage Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Contents
FILEMAKER PRO SCRIPT STEPS REFERENCE 6
Open Manage Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229
Open Manage Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Open Script Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Open Manage Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Open Manage Value Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Open Find/Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Open Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Open Remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Open Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Upload To FileMaker Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Miscellaneous script steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Show Custom Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Allow Formatting Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Refresh Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Beep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Speak (OS X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Dial Phone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Install Plug-In File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Install Menu Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Set Web Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Open URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Send Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
AVPlayer Play . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
AVPlayer Set Playback State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
AVPlayer Set Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Refresh Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Send DDE Execute (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Perform AppleScript (OS X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Execute SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Send Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Flush Cache to Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Exit Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Get Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Enable Touch Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Script steps reference (alphabetical list)
FILEMAKER PRO SCRIPT STEPS REFERENCE 7
Script steps reference (alphabetical list)
Add Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Adjust Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Allow Formatting Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Allow User Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Arrange All Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
AVPlayer Play . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
AVPlayer Set Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
AVPlayer Set Playback State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Beep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Change Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Check Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Check Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Check Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Close File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Close Popover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Close Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Commit Records/Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Constrain Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Convert File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Copy All Records/Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Copy Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Correct Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Delete Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Delete All Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Delete Portal Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Delete Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Dial Phone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Duplicate Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Edit User Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Else If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Enable Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Enable Touch Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
End If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
End Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Enter Browse Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Enter Find Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Enter Preview Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Execute SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Exit Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Exit Loop If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Exit Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Export Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Export Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Extend Found Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Find Matching Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Flush Cache to Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Script steps reference (alphabetical list)
FILEMAKER PRO SCRIPT STEPS REFERENCE 8
Freeze Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Get Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Go to Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Go to Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Go to Next Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Go to Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Go to Portal Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Go to Previous Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Go to Record/Request/Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Go to Related Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Halt Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Import Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Insert Audio/Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Insert Calculated Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Insert Current Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Insert Current Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Insert Current User Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Insert File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Insert From Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Insert From Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Insert From Last Visited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Insert From URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Insert PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Insert Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Insert Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Install Menu Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Install OnTimer Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Install Plug-In File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Modify Last Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Move/Resize Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
New File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
New Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
New Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Omit Multiple Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Omit Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Open Edit Saved Finds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Open File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Open File Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Open Find/Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Open Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Open Manage Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Open Manage Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229
Open Manage Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Open Manage Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Open Manage Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Open Manage Value Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Open Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Open Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Open Remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Open Script Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Open Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Open URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Script steps reference (alphabetical list)
FILEMAKER PRO SCRIPT STEPS REFERENCE 9
Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Pause/Resume Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Perform AppleScript (OS X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Perform Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Perform Find/Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Perform Quick Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Perform Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Perform Script On Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Print Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Recover File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Refresh Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Refresh Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Refresh Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Re-Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Relookup Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Replace Field Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Reset Account Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Revert Record/Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Save a Copy as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Save Records As Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Save Records As PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Save Records As Snapshot Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Scroll Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Select All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Select Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Select Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Send DDE Execute (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Send Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Send Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Set Allowed Orientations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Set Error Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Set Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Set Field By Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Set Layout Object Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Set Multi-User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Set Next Serial Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Set Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Set Use System Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Set Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Set Web Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Set Window Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Set Zoom Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Show All Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Show Custom Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Show Omitted Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Show/Hide Menubar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Show/Hide Text Ruler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Show/Hide Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Sort Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Sort Records by Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Speak (OS X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Spelling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Truncate Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Script steps reference (alphabetical list)
FILEMAKER PRO SCRIPT STEPS REFERENCE 10
Undo/Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Unsort Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Upload To FileMaker Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
View As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
About script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 11
About script steps
Creating scripts to automate tasks
Scripts can do simple tasks like setting print orientation or complex tasks like preparing a
customized mailing to each client.
For example, you could define a complex set of tasks that creates a thank you email to clients in the
Clients database who have made purchases in the last week. The script composes an email tailored
to each client. The script switches to Preview mode and pauses so you can see what the message
looks like before it is sent. The whole task is initiated by clicking a button on the Sales Entry layout.
You build scripts by selecting from a list of FileMaker Pro commands, called scripts steps, specifying
options (if necessary), and arranging the steps in the correct order to perform the task.
Using this script steps reference
The content in this document was originally written for FileMaker Pro Help. It has been collected in
this format to allow solution developers to read the information independent of the help system.
Links to help topics may not work in this format.
Script step topics are organized by category. Each script step topic describes what the script step
does, and what its options and parameters are. Each topic also shows the format for the script step
and provides a usage example.
Learning about scripts
If you’re new to scripting, use the following resources to learn about scripts.
To view help topics about scripting:
In FileMaker Pro, choose Help menu > FileMaker Pro Help. In Help, choose Automating
tasks with scripts. You can also search help for information about scripting.
To view all help topics about individual script steps:
In FileMaker Pro, choose Help > FileMaker Pro Help. In Help, choose Reference > Script
steps reference.
To view answers to frequently asked questions, tips, troubleshooting advice, and more, visit the
FileMaker Knowledge Base at http://help.filemaker.com.
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 12
Control script steps
Control script steps control the progression of the script by letting you tell FileMaker Pro exactly
what to do when and if specific conditions occur.
Use these script steps to:
call scripts and sub-scripts
pause and resume a script, based on defined conditions
conditionally perform script steps using if/then/else logic
stop a script before it's finished, if a specific condition is met
create loops that repetitively carry out a sequence of steps in a script, until a condition is
met
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 13
Perform Script
Purpose
Performs a script that is defined in the current file or in another FileMaker Pro file.
Format
Perform Script [“<script name>; Parameter: <parameter>]
Options
<script name> specifies the script you want to perform.
Optional script parameter specifies a script parameter for the specified script.
See Specify Script dialog box.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
There is no need to open an external file when using a script in it—FileMaker Pro opens it for you.
You can use separate scripts to break complex tasks into smaller segments, which are often easier
to troubleshoot. You can also save time by putting common tasks like printing or exporting records
into separate scripts, which can then be accessed by more than one script. For example, you might
want to use the same page setup and printing options in several scripts. By defining those steps
once and saving them in separate scripts, you make it easy to access those steps many times.
Use script parameters to pass text or numbers into a script. When a parameter is specified, that
parameter may be accessed within a script or passed to other script steps using the
Get(ScriptParameter) function.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Partial
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 14
Script parameters:
exist within the parent script only unless explicitly passed to the sub-script. If your script
calls another script, parameters in the called script are independent of parameters in the
parent script.
exist only for the duration of the script. Script parameters are reset each time a script is
performed.
can be used (but not modified) within a script and can be passed along to sub-scripts by
using the Get(ScriptParameter) function as the parameter for the sub-script. You can also
specify different parameters each time the sub-script is called using Perform Script.
Changing the parameters passed to a sub-script does not modify the value of the
parameters returned from Get(ScriptParameter) in the parent script.
can contain multiple values separated by carriage returns. Use the LeftValues function,
MiddleValues function, and RightValues function to isolate a specific parameter.
Tip If you've performed an external script and you want to return to the original file, add an Enter
Browse Mode step or Go to Layout step right after the Perform Script step in the original file, so that
the script returns to the original file.
Notes
If you are using FileMaker Pro Advanced to define a custom menu item that performs a
script, select the script and optional script parameters. For more information, see Defining
custom menus (FileMaker Pro Advanced).
For scripts run via FileMaker WebDirect or Custom Web Publishing, the files containing the
scripts must on the same FileMaker Server and have the appropriate extended privileges
enabled to permit access. See Editing extended privileges fofr a privilege set.
A runtime solution can perform an external script only if the external file is bound to the
solution.
Example 1
Runs the "Print Invoice Report" script with no parameters.
Go to Layout ["Invoice Report"]
Perform Script ["Print Invoice Report"]
Example 2
Uses a field value, Customer Name, as the parameter. Invoices for the current customer are
returned in a new window with the Invoice Report layout.
Main script: Current Customer Invoices
Find Matching Records [Replace; Invoices::Customer ID]
#Calls the "View Customer Invoices" sub-script defined below
Perform Script ["View Customer Invoices"; Parameter:
Invoices::Customer Name]
Sub-script: View Customer Invoices
New Window [Name: "Customer: " & Get ( ScriptParameter ); Style:
Document]
Go to Layout ["Invoice Report"]
Sort Records [Restore; With dialog: Off]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 15
Perform Script On Server
Purpose
Performs a script on the server that is hosting the current file.
Format
Perform Script on Server [Wait for completion; "<script name>"; Parameter:
<parameter>]
Options
<script name> specifies the script you want to perform. See Specify Script dialog box.
Optional script parameter specifies a script parameter for the specified script.
Wait for completion pauses the script on the client until the sub-script called by Perform
Script On Server is completed on the host. Wait for completion must be selected to pass a
script result or error code from the host to the client. Use the Get(ScriptResult) function to
capture a result or the Get(LastError) function to capture an error code.
Compatibility
Originated in
FileMaker Pro 13.0
Description
The current file must be hosted on FileMaker Server. Otherwise, Perform Script On Server returns
an error. See About running scripts on FileMaker Server.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution No
Control script steps
FILEMAKER 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."]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 17
Pause/Resume Script
Purpose
Pauses a script so the user can perform other tasks in the current window.
Format
Pause/Resume Script [Indefinitely/Duration (seconds) <n>]
Options
Indefinitely pauses the script until the user clicks Continue (a button created by
FileMaker Pro in the status toolbar) or presses Enter.
For duration pauses the script for the number of seconds you specify.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step can, for example, wait for a user to enter data, and then guide the user from screen
to screen, prompting for data entry as needed. You can also use Pause/Resume Script to help
debug your scripts, for example, to see what value is in a field at a particular point in a script or to
evaluate the progress of a script.
The Pause/Resume Script script step operates on the foreground window of the file from which the
script is performed. If the script’s current window is hidden, Pause/Resume Script brings that
window to the front and shows it.
The For duration value must evaluate as a number, which is the duration of the pause in seconds.
If you use the Specify Calculation dialog box to determine the duration, the calculation result must
be a number or your script will not pause.
To give you more control over a user's actions when a script pauses, FileMaker Pro makes some
menu commands unavailable to users. You can define buttons to let users perform actions not
available on the menus.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 18
Notes
A Pause/Resume Script step unfreezes a Freeze Window script step.
In FileMaker WebDirect, if the Pause/Resume Script step pauses a script and the web user
is idle for longer than the session timeout specified in the FileMaker Server Admin Console,
the web user’s connection will close and the script will end early, which may lead to
unexpected results.
In Custom Web Publishing, this script step is supported, but you should avoid using it. If the
script remains in a paused state until the session times out, then the script will not be
completed.
Example 1
Goes to the Print Invoices layout and pauses. The user can click a Continue button on the status
toolbar or the layout to print the records.
Go to Layout ["Print Invoices"]
Pause/Resume Script [Indefinitely]
Print [Restore: Printer; With dialog: Off]
Go to Layout [original layout]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 19
Exit Script
Purpose
Forces the running script, sub-script, or external script to stop immediately.
Format
Exit Script [Text Result: <value or formula>]
Options
<value or formula> specifies a text value to pass back to the parent script. The value is typically
based on the state of the current script.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If Exit Script is used in a sub-script, returns to the main script with or without an optional script result.
If the optional script result is specified, the script result is returned and stored in the main script until
another sub-script that returns a value is called. The script result gets deleted when you exit the
main script. The script result can be stored in a local or global variable for later use.
Example 1
Performs a find and prints. If no records are found, displays all records and exits the script.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show All Records
Exit Script [Text Result: ]
End If
Print [With dialog: Off]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 20
Example 2
Prints unpaid invoices. In the Print sub-script, users can choose whether they want to print invoices.
If users choose to print, then Exit Script uses a script result to enter “Printed on <current date>” in
the Status field.
Main script: Print Unpaid Invoices
New Window [Name: "Invoice List"; Style: Document]
Go to Layout ["Print Invoices"]
Perform Find [Restore]
#Calls the "Print" sub-script defined below
Perform Script ["Print"]
#Continues after the sub-script is completed
If [Get ( ScriptResult ) = 1]
Replace Field Contents [With dialog: Off; Invoices::Status;
"Printed on " & Get ( CurrentDate )]
Else
Show All Records
Sort Records [Restore; With dialog: Off]
End If
Sub-script: Print
Show Custom Dialog ["Print Unpaid Invoices"; "Do you want to print
unpaid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Print [With dialog: Off]
Else
Close Window [Current Window]
End If
#Uses the Result parameter to pass the user’s choice to the main script
Exit Script [Text Result: Get ( LastMessageChoice )]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 21
Halt Script
Purpose
Forces all scripts, sub-scripts, or external scripts running in the current FileMaker application to stop
immediately.
Format
Halt Script
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Halt Script can leave your database in an unpredictable state. For example, the script might halt in
an unanticipated layout, view, or mode.
Example 1
Performs a find and prints. If no records are found, displays all records and halts the script.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show All Records
Halt Script
End If
Print [With dialog: Off]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 22
Example 2
The Print Unpaid Invoices script calls the Print sub-script. If the user chooses not to print invoices,
the script and sub-script stop. If the user chooses to print invoices, unpaid invoices that match the
Find criteria are printed. After printing, all records are displayed and sorted.
Main script: Print Unpaid Invoices
New Window [Name: "Invoice List"; Style: Document]
Go to Layout ["Print Invoices"]
Perform Find [Restore]
#Calls the "Print" sub-script defined below
Perform Script ["Print"]
#Continues after the sub-script is completed if the user chose to print
the invoices
Show All Records
Sort Records [Restore; With dialog: Off]
Sub-script: Print
Show Custom Dialog ["Print Unpaid Invoices"; "Do you want to print
unpaid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Print [With dialog: Off]
Else
Close Window [Current Window]
#Halts both the sub-script and the main script
Halt Script
End If
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 23
If
Purpose
Evaluates a Boolean calculation and performs a conditional action based on that evaluation.
Format
If [<Boolean calculation>]
Options
<Boolean calculation> specifies the calculation you want evaluated.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If the calculation result is any number except zero, the calculation evaluates to true and the
subsequent script steps are executed. If the calculation result is zero, no data, or does not resolve
into a number, then the calculation evaluates to false and the subsequent script steps are not
executed.
Every If step must have a corresponding End If script step somewhere after the If step and at the
same indentation. Whenever you use an If script step, the script editing pane automatically enters
an End If step.
You can also add additional conditions by using the Else If script step and Else script step.
Note If you do not specify a calculation or if the calculation is unsuccessful, it will evaluate as false.
Use the Get(LastError) function to capture these errors.
Example 1
Performs a find. If no records are found, displays all records and sorts.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show All Records
Sort Records [Restore; With dialog: Off]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 24
Example 2
Performs a find. If no records are found, displays a custom dialog box. If records are found, sorts the
found set.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["Find Records"; "No records were found."]
Else
Sort Records [Restore; With dialog: Off]
End If
Example 3
Performs a find. If no records are found, displays a custom dialog box. If one record is found, goes
to the Invoice Details layout. If more than one record is found, goes to the Invoices layout.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show Custom Dialog ["Find Records"; "No record was found."]
Else If [Get (FoundCount) = 1]
Go to Layout ["Invoice Details"]
Else
Go to Layout ["Invoices"]
End If
Example 4
Performs a find. If no records are found, displays a custom dialog box so the user can run the Find
Invoices script to search again. If one record is found, goes to the Invoice Details layout. If more
than one record is found, goes to the Invoices layout.
Script: Find Invoices
Perform Find [ ]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["No Record Found"; "No records were found. Do
you want to search again?"]
If [Get ( LastMessageChoice ) = 1]
#Calls this script again as a sub-script
Perform Script ["Find Invoices"]
Else
Show All Records
End If
Else If [Get ( FoundCount ) = 1]
Go to Layout ["Invoice Details"]
Else
Go to Layout ["Invoices"]
End If
Sort Records [Restore; With dialog: Off]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 25
Else If
Purpose
Evaluates a Boolean calculation and performs a conditional action based on that evaluation, like If.
Format
Else If [<Boolean calculation>]
Options
<Boolean calculation> specifies the calculation you want evaluated.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Else If must follow an If or another Else If script step. Else If cannot follow an Else script step.
When an If script step evaluates to false, script execution moves to the Else If script step. When an
Else If statement evaluates to true, the block of steps under the Else If is executed. An evaluation of
true ends the Else If process, and upon reaching the next Else If or Else statement, execution will
skip to the End If script step.
Example 1
Performs a find and sorts records. If no records match the find request, displays a custom dialog
box.
Perform Find [Restore]
If [ Get ( LastError ) = 0 ]
Sort Records [Restore; With dialog: Off]
Else If [ Get ( LastError ) = 401 ]
Show Custom Dialog ["No records were found."]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 26
Else
Purpose
Performs an alternate set of script steps when an If or Else If script step evaluates to false.
Format
Else
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Else must follow an If script step or Else If script step. Else cannot follow another Else script step.
When all If script steps and Else If script steps evaluate to false, script execution moves to the Else
script step. The script steps under Else are executed, and script execution moves to the End If script
step.
Example 1
Performs a find. If no records are found, displays a custom dialog box. If records are found, sorts the
found set.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["Find Records"; "No records were found."]
Else
Sort Records [Restore; With dialog: Off]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 27
End If
Purpose
Marks the end of an If script step structure.
Format
End If
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Every If script step must have a corresponding End If script step somewhere after it at the same
indentation. Whenever you use an If script step, the script editing pane automatically enters an End
If step.
Example 1
Performs a find. If no records are found, displays all records and sorts.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show All Records
Sort Records [Restore; With dialog: Off]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 28
Loop
Purpose
Repeats a set of script steps, to perform batch processes.
Format
Loop
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use Loop, for example, for exporting container field contents from all records in a found set. This
script step and the End Loop script step mark the beginning and end of a repeating structure of
script steps. The script performs the script steps that are enclosed within the loop structure until it
encounters one of the following:
an Exit Loop If script step
a Go to Record/Request/Page script step or Go to Portal Row script step when the Exit
after last option is selected
Every Loop step must have a corresponding End Loop step somewhere after the Loop step and at
the same indentation. Whenever you use a Loop script step, the script editing pane automatically
enters an End Loop step.
Example 1
Copies the contents of the Customers::Work Phone to Customer::Day Contact in all records.
Go to Record/Request/Page [First]
Loop
Set Field [Customers::Day Contact; Customers::Work Phone]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 29
Example 2
Loops through records to export files that are in the Container field.
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Export Field Contents [Products::Container; "$PATH"]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 30
Exit Loop If
Purpose
Exits a loop if the specified calculation is true (not zero).
Format
Exit Loop If [<Boolean calculation>]
Options
<Boolean calculation> specifies the calculation you want evaluated.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If the calculation is true (not zero), the script continues with the script step that follows the End Loop
script step.
If the calculation if false (zero), the loop is not exited and the script continues with the script step that
follows the Exit Loop If script step.
Example 1
Loops through records to export files that are in container fields. Exits the loop if a record has an
empty Container field.
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Exit Loop If [IsEmpty ( Products::Container )]
Export Field Contents [Products::Container; "$PATH"]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 31
End Loop
Purpose
Marks the end of a Loop script structure.
Format
End Loop
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Whenever you use a Loop script step, the script editing pane automatically enters an End Loop
step. The steps between Loop and End Loop are automatically indented and the End Loop step is
placed at the same indentation level as its corresponding Loop step.
Example 1
Copies the data from Customers::Work Phone to Customers::Day Contact in all records.
Go to Record/Request/Page [First]
Loop
Set Field [Customers::Day Contact; Customers::Work Phone]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 32
Allow User Abort
Purpose
Allows or prevents users from stopping a running script.
Format
Allow User Abort [<On/Off>]
Options
On allows users to stop a script by pressing Esc or Command-.(period) (OS X).
Off prevents users from stopping a script by pressing Esc or Command-.(period) (OS X).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The Allow User Abort script step affects the script that it is executed in and all sub-scripts.
By default, users can stop a script by pressing Esc or Command-.(period) (OS X). To prevent users
from stopping a script, use the Allow User Abort script step and set it to Off.
By default, unknown (obsolete or unrecognized) script steps will stop a script. To change this
behavior, set the Allow User Abort script step to one of the following. In either case, unknown script
steps return FileMaker Pro error 4 (“Command is unknown”).
On (default) allows unknown script steps to stop the script
Off skips unknown script steps and allows the script to continue to run
Notes
Clients can’t abort server-side scripts or scripts performed via Custom Web Publishing. In
these cases, this script step determines only whether unknown script steps are skipped.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 33
Example 1
Displays the records in the Print Invoices layout in a new window in Preview mode and pauses the
script. You can click Continue to print the invoices, or you can cancel printing in the Print dialog box
because in the Print script step, the With dialog option is On. Allow User Abort is Off so that you
aren't left with an extra window open if you cancel the script.
Allow User Abort [Off]
New Window [Name: "Print Invoices"; Style: Floating Document]
Go to Layout ["Print Invoices"]
Enter Preview Mode [Pause: On]
Print [Restore: Printer; With dialog: On]
Close Window [Current Window]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 34
Set Error Capture
Purpose
Suppresses or enables normal FileMaker Pro alert messages.
Format
Set Error Capture [<On/Off>]
Options
On suppresses FileMaker Pro alert messages and some dialog boxes. If the error result is
100 or 803, then certain standard file dialog boxes are suppressed, such as the Open File
dialog box.
Off re-enables the alert messages.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to suppress normal FileMaker alert messages caused by subsequent script
steps so that your script can handle errors instead. It is important that you anticipate as many
problems as possible and include clear instructions for what to do for an error condition.
By using Get(LastError) function with certain control script steps, you can check whether the
previous script step returned an error and take the appropriate action.
Notes
Use Get (LastError) immediately after the script step you intend to test; a successful
intervening step may clear the error code you were intending to capture.
When Set Error Capture is used in a script that contains a sub-script, errors from the sub-
script are captured as well.
Server-side scripts and scripts performed via Custom Web Publishing always run as if Set
Error Capture were set to On. See About running scripts on FileMaker Server.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 35
Example 1
Performs a find and suppresses the error dialog box if no records were found.
Set Error Capture [On]
Perform Find [Restore]
Example 2
Performs a find. If no errors occur, sorts records. If no find criteria were specified, shows all records.
If no records match the find request, displays a custom dialog box.
Set Error Capture [On]
Perform Find [Restore]
If [Get ( LastError ) = 0]
Sort Records [Restore; With dialog: Off]
Else If [Get ( LastError ) = 400]
Show All Records
Else If [Get ( LastError ) = 401]
Show Custom Dialog ["Find"; "No records were found."]
End If
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 36
Set Variable
Purpose
Sets a local or global variable to a specified value.
Format
Set Variable [<variable name> {[<repetition number>]}; Value:<value or
formula>]
Options
Name is the name of the variable you want to create. Prefix the name with $ for a local
variable or $$ for a global variable. If no prefix is added, $ is automatically added to the
beginning of the name.
Value is the value the variable is set to. You can enter text or specify a calculation.
Repetition is the repetition (index) number of the variable you want to create. If no
repetition is specified, the default is 1.
Compatibility
Originated in
FileMaker Pro 8.0
Description
If a variable doesn’t exist, this script step will create one. A variable name has the same naming
restrictions as a field name. For more information, see About naming fields.
Local and global variables can be created and used in calculations.
A local variable can only be used in script steps in the currently executing script. The value
in a local variable is cleared when the script exits.
A global variable can be used in a calculation or script anywhere in a file, for example, other
scripts or file paths. The value of a global variable is not cleared until the file is closed.
Local and global variables (or even two local variables in different scripts) can have the
same name but they are treated as different variables and can store different values.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 37
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; With dialog: Off; "$PATH"; Current
record]
Else
Set Variable [$PATH; Value: Get ( DocumentsPath ) & "Invoice " &
Invoice::Invoice Number & ".pdf"]
Save Records as PDF [Restore; With dialog: Off; "$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 [Text Result: ]
End If
Find Matching Records [Replace; Invoices::Customer Name]
Go to Record/Request/Page [First]
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 38
Set Layout Object Animation
Purpose
Enables or disables animations while a script is running.
Format
Set Layout Object Animation [<On/Off>]
Options
On enables animations while a script is running.
Off disables animations while a script is running.
Compatibility
Originated in
FileMaker Pro 13.0
Description
Enabling animations increases the time required for a script to run. Disabling animations overrides
any animation settings for other script steps. This script step affects all script-initiated animations in
all windows.
Note Set Layout Object Animation does not return an error when it runs in a FileMaker product in
which animations are not supported.
Example 1
While a script is running, animations are typically disabled. If a script causes a slide control to switch
between panels, there will be no animation providing feedback to users. To call attention to the
transition from panel to panel, use Set Layout Object Animation [On] to enable animation
prior to switching between slide panels using the Go to Object script step.
Set Layout Object Animation [On]
Go to Object [Object Name: "Panel 1"]
Pause/Resume Script [Duration (seconds): .5]
Go to Object [Object Name: "Panel 2"]
Pause/Resume Script [Duration (seconds): .5]
Go to Object [Object Name: "Panel 3"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 39
Install OnTimer Script
Purpose
Runs a specified script at the specified interval.
Format
Install OnTimer Script [“<script>”; Parameter: <script parameter>;
Interval: <number>]
Options
Specify script lets you specify the script you want to perform.
Optional script parameter lets you specify a script parameter for the specified script.
Interval seconds is the value in seconds that the timer waits before running the script.
Compatibility
Originated in
FileMaker Pro 10.0
Description
This script step installs a single timer on the active window and repeats the specified script in that
window until another Install OnTimer Script step installs a timer on the window or until the window
closes. You can halt an installed timer by running another Install OnTimer Script step without
specifying a script or interval.
Notes
If a script is running, any scripts associated with timers will not run until the script that is
running finishes.
If the active window has an installed timer and the user or a script opens a new window, the
new window inherits the timer.
Each window can have a separate timer operating at the same time. Timers continue to run
even if windows are in the background or hidden. If you’re using dialog windows and timers,
see About window styles.
To run scripts on a schedule and independently of open windows, see FileMaker Server
Help.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Control script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 40
Example 1
Uses the Install OnTimer Script step to run the Clock script once every minute.
Script: Clock OnTimer
Install OnTimer Script [“Clock”; Interval: 60]
Script: Clock
Set Field [Clock::Time; Get ( CurrentTime )]
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 41
Navigation script steps
Navigation script steps move to different areas of a database. Use Navigation script steps to:
go to a specific record or find request
switch to a specific layout
move among fields and other objects on a layout
emulate pressing Enter or Tab
switch to Browse mode to work with contents of a file
switch to Find mode to fill out find requests
switch to Preview mode to see how records, forms, or reports will look when they're printed
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 42
Go to Layout
Purpose
Switches to the specified layout.
Format
Go to Layout [“<layout name or layout number>”]
Options
original layout is the active layout when the script is initiated.
Layout specifies a layout by name from the list of layouts you’ve defined in your file.
Layout Name by calculation specifies a formula whose result is a valid layout name.
Layout Number by calculation specifies a formula whose result is a valid layout number.
(Layout numbers correspond to the order of the layouts in the file.)
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is useful when you begin a script to make sure the user starts with the correct layout
displayed.
Notes
The Go to Layout script step can only take you to layouts defined in the same file as the
script itself. To go to layouts in an external file, define a script in that file using the Go to
Layout script step, and call that script from the first file using the Perform Script script step.
Layout Name by calculation recognizes layouts with the same names in the order in which
they were created. If you have multiple layouts with the same name, either select the
specific layout you want from the layout list or use Layout Number by calculation.
Define an unstored calculation field with the function Get(LayoutNumber) function and place
it on your layouts to verify the layout numbers of your layouts.
When a file has two or more tables, FileMaker Pro appends the name of the source table to
the layout name for clarity. For example, Go to Layout [“Layout #2” (TableB)].
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 43
Example 1
Opens a new window and goes to the Summary field on the Invoice Details layout.
New Window [Style: Document]
Go to Layout ["Invoice Details"]
Go to Field [Invoices::Summary]
Example 2
Checks which device is running the database and goes to the appropriate layout.
If [PatternCount ( Get ( ApplicationVersion ); "iPad" )]
Go to Layout ["Customers iPad"]
Else If [PatternCount ( Get ( ApplicationVersion ); "Pro" )]
Go to Layout ["Customers"]
Else
Go to Layout ["Customers iPhone"]
End If
Sort Records [Restore; With dialog: Off]
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 44
Go to Record/Request/Page
Purpose
Moves to a record or a report page, or displays a find request.
Format
Go to Record/Request/Page [<First/Last/Previous/Next/By Calculation>]
Options
First moves to the first record in the file or found set (Browse mode), displays the first find
request (Find mode), or moves to the first page in a report (Preview mode).
Last moves to the last record in the file or found set, displays the last find request, or moves
to the last page in a report.
Previous moves to the previous record in the file or found set, displays the previous find
request, or moves to the previous page in a report. Exit after last tells FileMaker Pro to stop
the script when it reaches the last record in the found set. You can use Exit after last with
the Loop script step to exit out of a loop after the last record.
Next moves to the next record in the file or found set, displays the next find request, or
moves to the next page in a report. Exit after last tells FileMaker Pro to exit the script or
control structure (like a loop) when it reaches the last record in the found set.
By Calculation specifies a calculation to determine the desired record number, find request
number, or page number. Set With dialog to On to display the number in a dialog box for
confirmation.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
In Browse mode, this script step moves to a record; in Find mode it displays a find request, and in
Preview mode it moves to a report page.
Server-side scripts and Customer Web Publishing do not support the By Calculation option.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 45
Example 1
Performs a find, sorts the records, and goes to the first record.
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Example 2
Goes to the record number the user enters in the custom dialog box.
Show Custom Dialog ["Enter the record number you want to view.";
Invoices::Record Number]
Go to Record/Request/Page [Invoices::Record Number]
Show All Records
Example 3
Loops through records to export files that are in the Container field. Exits the loop if a record has an
empty container field.
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Exit Loop If [IsEmpty ( Products::Container )]
Export Field Contents [Products::Container; "$PATH"]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 46
Go to Related Record
Purpose
Goes to the current related record(s) in a related table.
Format
Go to Related Record [From table: “<table name>”; Using layout “<layout
name>”; New window]
Options
Get related record from specifies the source relationship from a list of tables in the current
database. If the table is not in the list or if you need to add or change a relationship, Manage
Database displays the Manage Database dialog box, where you can create or edit
relationships.
Show record using layout specifies the layout in the current file that will be used to display
the related record(s).
Use external table’s layouts opens the file containing the external table you specify and
lets you choose a layout from that file in which to display the related record(s). This option is
only available if the source relationship you selected references a table in another file.
Show in new window shows the related records in a new window and lets you specify the
settings for the new window. For more information, see New Window script step.
Tip To bring the new window with the related record(s) to the front automatically, add the Select
Window script step.
Show only related records creates a new found set in the related table with the options
either to match the current record or to match the entire found set. The first record in the
found set becomes the current record. (If you don’t select this option, Go to Related Record
makes the first record in the table’s unsorted order the current record.)
Match current record only creates a new found set in the related table containing a set of
records that match the current record. For example, if there are three records in the related
invoice table that match the customer record in the customer table you are currently
viewing, and you want to see all three invoices, use Match current record only to display
the three invoices.
Match all records in the current found set creates a new found set in the related table
that matches all records in the current found set. For example, if you have a found set of ten
customers and there are forty invoices in the invoice table that match any of these ten
customers, use Match all records in the current found set to display the forty matching
invoices. If you don’t define a sort order, the found set will be unsorted.
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 47
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Suppose you have an Invoices table that's related to a Customers table and you're currently looking
at a particular invoice. In the Invoices table, you have a button that's set to Go to Related Record
[Customers]. Clicking this button determines which customer record your current invoice is related
to and immediately goes to that record in the Customers table. If the record in question is not
currently in the Customers table’s found set, the script can perform a find to make the record
current.
Tip If the related records cannot be found, this script step returns an error code which can be
captured with the Get(LastError) function.
This script step also works with portal rows. If this script step is used from an active portal row, and
the portal’s table is the related table, then the related record in that table is made current. If the
portal’s table is not the related table, the first related record in the found set is made current.
When used with a table in an external file, this script step will open the file containing the external
table and, if selected, go to the external layout you specify.
There are situations in which a script containing the Go to Related Record script step could modify
an unintended set of records. For example:
If the related records cannot be found, this script step remains on the current layout.
If you select a table occurrence to which there’s no relationship, or a layout that doesn’t
refer to the correct table occurrence, FileMaker Pro displays an error message. After the
error message displays, script execution continues with the next script step.
If there are no related records or no record in the active portal row, the script might produce
unexpected results. Use the IsEmpty function to determine if there are no related records
before using Go to Related Record.
If you have Allow creation of related records enabled and Go to Related Record is
executed from an empty portal row, the script might produce unintended results.
Notes
The sort order is not maintained if the related records are in an external file.
If you are filtering records in a portal, this script step exposes all of the records, not just the
filtered records.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 48
Example 1
Goes to a related record in the Invoices table and sorts the found set of related records.
Go to Related Record [Show only related records; From table: "Invoices";
Using layout: “Invoices”]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Example 2
Goes to a related record in the Invoices table and sorts the found set of related records in a new
window.
Go to Related Record [Show only related records; From table: "Invoices";
Using layout: “Invoices”; New Window]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 49
Go to Portal Row
Purpose
Navigates among the rows in the active portal.
Format
Go to Portal Row [Select; <First/Last/Previous/Next/By Calculation>]
Options
Select entire contents selects the entire portal row. If select entire contents isn’t selected,
only one related field in the portal is active.
First moves to the first row in the portal.
Last moves to the last row in the portal.
Previous moves to the previous row in the portal. Exit after last tells FileMaker Pro to exit
the script when it reaches the last portal row. You can use Exit after last within a loop to exit
the loop after the last portal row.
Next moves to the next row in the portal. Exit after last tells FileMaker Pro to exit the script
when it reaches the last portal row. You can use Exit after last within a loop to exit the loop
after the last portal row.
By Calculation moves to the row number that is the result of the calculation you create, or
to the row number confirmed in a dialog box if you set With dialog to On.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
When no portal is active, the script uses the first portal in the layout stacking order.
This script step tries to keep the same related field selected when changing rows. If no field in a
portal is selected, the script selects the first related field it can enter.
When a related field in a portal is selected, you can use this step to move to the same field in
another portal row. For example, if the third field in the second portal row is selected, Go to Portal
Row [Next] goes to the third field in the third portal row.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 50
Notes
In FileMaker WebDirect, the cursor moves next to the specified row, but the row is not
selected.
Server-side scripts and Custom Web Publishing do not support the By Calculation option.
Example 1
Goes to the last row of a portal to create a record.
Go to Field [Related Invoices::Summary]
Go to Portal Row [Last]
Example 2
Allows a user to make batch updates to the Status field in a portal.
Go to Portal Row [Select; First]
Loop
Go to Field [Select/perform; Invoices::Status]
Pause/Resume Script [Indefinitely]
Go to Portal Row [Next; Exit after last]
End Loop
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 51
Go to Object
Purpose
Moves to the specified object on the current layout.
Format
Go to Object [Object Name: "<object name>"; Repetition: <value or
formula>]
Options
Object Name is the named object to make active on the current layout. To assign an object
name, choose View menu > Inspector in Layout mode. Click the Position tab, then
enter a name for the object.
Repetition (optional) lets you choose a field's repetition to go to. Otherwise defaults to 1.
This option is ignored if the object is not a field.
Compatibility
Originated in
FileMaker Pro 8.5
Description
This script step uses an object name to identify an object, so you must assign a unique object name
to each object on a layout that you want to go to.
Notes
If this script step specifies an object on a tab panel or a slide panel that is not the front-most
panel, the specified object is selected and the panel it is on moves to the front of the panel
control.
If the script step specifies a field on a popover, the popover opens.
Example 1
Navigates to a text field named "First Name".
Go to Object [Object Name: "First Name"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 52
Example 2
Navigates between different tabs of a tab control.
If [Invoices::Status = "Paid"]
Go to Object [Object Name: "Invoice Statement Tab"]
Else If [Invoices::Status = "Unpaid"]
Go to Object [Object Name: "Invoice Payment Tab"]
End If
Example 3
Navigates to either the "Paid" tab or the "Unpaid" tab in a tab control depending on the value of
Invoices::Status.
Go to Layout ["Invoice Details"]
Go to Object [Object Name: Invoices::Status]
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 53
Go to Field
Purpose
Moves to the specified field on the current layout.
Format
Go to Field [Select/perform; <table::field>]
Options
Select/perform tells FileMaker Pro to select all contents of a field. For example, if the
primary command is Edit, Select/perform opens the document in a state ready for editing.
Go to target field specifies the target field.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Notes
If this script step specifies a field on a tab panel or a slide panel that is not the front-most
panel, the specified field is selected and the panel it is on moves to the front of the panel
control. If, however, the same field appears elsewhere on the layout and the script finds that
field first, the panel with that same field will not come forward. You can force FileMaker Pro
to find a specific field by assigning an object name to the field and using the Go to Object
script step to move to that instance of the field. If the object is a repeating field, you can also
specify which repetition that you want to go to.
If the script step specifies a field on a popover, the popover opens.
In FileMaker WebDirect:
The cursor moves to the specified field.
If the target field is not visible in the web browser window, Go to Field does not scroll the
window to make the target field visible.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 54
Example 1
Goes to the Invoice Details layout, creates a record, and goes to the Summary field.
Go to Layout ["Invoice Details"]
New Record/Request
Go to Field [Invoices::Summary]
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 55
Go to Next Field
Purpose
Moves to the next field in the tab order of the current layout.
Format
Go to Next Field
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If no field is selected when this script step is performed, this script step moves to the first field in the
tab order of the current layout. If a field is formatted as a button, the field object is selected, not the
button object.
Note In FileMaker WebDirect, the cursor moves to the selected field.
Example 1
Goes to the next field in the tab order unless the Status field in the current record is empty.
If [IsEmpty ( Invoices::Status )]
Show Custom Dialog ["Invoice Status cannot be empty."]
Else
Go to Next Field
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 56
Go to Previous Field
Purpose
Moves to the previous field in the tab order of the current layout.
Format
Go to Previous Field
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If no field is selected when this script step is performed, this script step moves to the last field of the
tab order of the current layout. If a field is formatted as a button, the field object is selected, not the
button object.
Note In FileMaker WebDirect, the cursor moves to the selected field.
Example 1
Controls field entry validation. Can be started with the OnObjectExit script trigger.
If [IsEmpty ( Customers::First Name )]
Show Custom Dialog ["You must enter a first name."]
Go to Previous Field
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 57
Close Popover
Purpose
Closes an open popover in the window in which the script step runs.
Format
Close Popover
Options
None.
Compatibility
Originated in
FileMaker Pro 13.0
Description
Closes an open popover in the target window. If no popover is open, Close Popover does nothing
and does not return an error code.
Example 1
Closes the open popover and navigates to either the "Paid" or the "Unpaid" tab of a tab control
depending on the value of Invoices::Status.
Close Popover
Go to Object [Object name: Invoices::Status]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 58
Enter Browse Mode
Purpose
Switches to Browse mode.
Format
Enter Browse Mode [Pause: Off/On]
Options
Pause temporarily stops the script to allow users to enter data.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Goes to the Print invoices layout, enters Preview mode, prints, and enters Browse mode.
Go to Layout ["Print Invoices"]
Enter Preview Mode [Pause: Off]
Print [With dialog: Off]
Enter Browse Mode [Pause: Off]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 59
Enter Find Mode
Purpose
Switches to Find mode.
Format
Enter Find Mode [Pause: On/Off]
Options
Pause temporarily stops the script to allow users to enter a find request.
Specify find requests allows you to create and edit requests for use with this script step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
When you select Specify find requests at the time the script step is defined, FileMaker Pro
displays the current find request(s), if any. Additional find requests can be defined, and existing find
requests can be duplicated, edited, or deleted.
To edit a find request, select it from the list in the Specify Find Requests dialog box and click Edit.
In the Edit Find Requests dialog box, select the action (Find Records or Omit Records) you want
the find request to perform. A single find request can either find records or omit records, but cannot
perform both actions at the same time. Use multiple find requests to find and omit records from
within a single script step.
For each field in your request, specify the criteria for which you want FileMaker Pro to search.
Example 1
Goes to the Invoice Details layout, enters Find mode, pauses for user input, and performs the find.
Go to Layout ["Invoice Details"]
Enter Find Mode [Pause: On]
Perform Find [ ]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Navigation script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 60
Enter Preview Mode
Purpose
Switches to Preview mode.
Format
Enter Preview Mode [Pause: Off/On]
Options
Pause temporarily stops the script to allow users to examine the preview result before proceeding
with the next step in the script.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Opens the Print Invoices layout in a new window, enters Preview mode, prints, and closes the
window.
New Window [Style: Floating Document]
Go to Layout ["Print Invoices"]
Enter Preview Mode [Pause: Off]
Print [With dialog: Off]
Close Window [Current Window]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 61
Editing script steps
With editing script steps, you can cut, copy, paste, or clear the contents of a field; undo or redo
previous actions; or select the contents of a field.
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 62
Undo/Redo
Purpose
Reverses, restores, or switches between the most recently performed actions in the file.
Format
Undo/Redo [Undo/Redo/Toggle]
Options
Undo reverses the previously performed action in the file.
Redo restores the previously undone action in the file.
Toggle switches between the two most recently performed actions in the file.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Multiple actions can be undone by repeatedly executing this script step with the Undo option. The
number of actions that can be undone or redone is limited only by the amount of available memory.
Example 1
Undoes data entry if the Phone Number field has fewer than seven digits.
If [Length ( Customer::Phone Number ) < 7]
Show Custom Dialog ["Phone Number must contain at least 7 digits. Undo
number input?"]
If [Get ( LastMessageChoice ) = 1]
Undo/Redo [Undo]
End If
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 63
Cut
Purpose
Deletes the contents of the specified field in the current record and saves the contents to the
Clipboard.
Format
Cut [Select; <table::field>]
Options
Select entire contents deletes the contents of a field in the current record and saves it to
the Clipboard. If you do not use Select entire contents, only the selected portion of the
field's data is cut.
Go to target field specifies the field whose contents you want to cut.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step removes the contents of the field. To duplicate the field information, use the Copy
script step.
Notes
Contents that you cut or copy to the Clipboard are accessible to other applications.
With FileMaker WebDirect, the Cut script step does not place data onto the Clipboard.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Cuts the contents of the Email field in the current record.
Cut [Customers::Email]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Partial
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 64
Example 2
Prompts the user to either cut or copy the contents of the Email field.
Show Custom Dialog ["Do you want to cut or copy the customer's email
address?"]
If [Get ( LastMessageChoice ) = 1]
Cut [Customers::Email]
Else If [Get ( LastMessageChoice ) = 2]
Copy [Customers::Email]
End If
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 65
Copy
Purpose
Copies the contents of the specified field in the current record and saves the contents to the
Clipboard.
Format
Copy [Select; <table::field>]
Options
Select entire contents copies the entire contents of a field in the current record to the
Clipboard. If you do not use Select entire contents, only the selected portion of the field's
data is copied.
Go to target field specifies the field whose contents you want to copy. When no field is
specified and nothing is selected, FileMaker Pro copies the values from all fields of the
current record.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step duplicates the contents of the field. To remove the field information, use the Cut
script step.
Notes
Contents that you cut or copy to the Clipboard are accessible to other applications.
With FileMaker WebDirect, the Copy script step does not place data onto the Clipboard.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Partial
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 66
Example 1
Prompts the user to either cut or copy the contents of the Email field.
Show Custom Dialog ["Do you want to cut or copy the customer's email
address?"]
If [Get ( LastMessageChoice ) = 1]
Cut [Customers::Email]
Else If [Get ( LastMessageChoice ) = 2]
Copy [Customers::Email]
End If
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 67
Paste
Purpose
Pastes the contents of the Clipboard into the specified field in the current record.
Format
Paste [Select; No style; <table::field>]
Options
Select entire contents replaces the contents of a field with the contents of the Clipboard. If
you do not use Select entire contents, Paste copies the contents of the Clipboard to the
currently selected portion of the field.
Paste without style tells FileMaker Pro to ignore all text style and formatting associated
with the Clipboard contents.
Go to target field specifies the field to paste into.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If you try to paste data that doesn't match the field type of the target field, FileMaker Pro pastes the
data but displays a validation alert when you attempt to exit the field. If the field is not on the current
layout, FileMaker Pro returns an error code which can be captured with the Get(LastError) function.
Note If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run this script
step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Pastes the Clipboard contents into the active field.
Show Custom Dialog ["Do you want to paste the Clipboard contents?"]
If [Get ( LastMessageChoice ) = 1]
Paste [Select]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Partial
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 68
Clear
Purpose
Deletes the contents of the specified field in the current record.
Format
Clear [Select; <table::field>]
Options
Select entire contents deletes the entire contents of a field. If you do not use Select entire
contents, only the selected portion of the field's data is deleted.
Go to target field specifies the field whose contents you want to delete.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step removes the contents of the field in the current record without placing the contents
on the Clipboard. If you want to cut and paste the field information, use the Cut script step. Use
Undo immediately to restore the contents.
Note If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run this script
step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Clears the Email field in the current record.
Show Custom Dialog ["Do you want to clear the customer's email address?"]
If [Get ( LastMessageChoice ) = 1]
Clear [Select; Customers::Email]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Partial
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 69
Set Selection
Purpose
Designates the starting and ending position of a selection in a field.
Format
Set Selection [<table::field>; Start Position: <n>; End Position: <n>]
Options
Go to target field specifies the field whose contents you want to select.
Start Position specifies the starting position of the selection.
End Position specifies the ending position of the selection.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The starting and ending values can be typed in directly or determined via a calculation. If no target
field is specified the current active field is used.
Notes
Field position is determined by the number of characters, including spaces, beginning with
position 1, the first character in the field. The selection includes all values beginning with the
Start Position and concluding with the End Position. For example, if Field1 has the value
abcdefgh”, and the script parameters specify a start position of “3” and an end position of
“6”, the script step will return the selection “cdef”.
If the start position is valid and the end position out of range, everything from the start
position to the end of the field is selected. If the end position only is valid, the cursor moves
to the end position, and nothing is selected. If both start and end positions are invalid, the
cursor moves to the end of the field contents.
No action is taken if the user attempts to perform a selection on a container field.
Data selected out of visual range is scrolled into view.
In FileMaker Go, this script step does not highlight selected text if the keyboard is hidden on
the device.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Partial
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 70
Example 1
Selects the first 5 digits of the Postal Code field.
Set Selection [Customers::Postal Code; Start Position: 1; End Position: 5]
Example 2
Selects the number of paragraphs that the user specifies in the custom dialog box.
Show Custom Dialog ["How many paragraphs do you want to select?";
Products::Number of Paragraphs]
If [Get ( LastMessageChoice ) = 1]
Set Selection [Products::Description; Start Position: 1; End Position:
Position ( Products::Description ; ¶ ; 1 ; Products::Number of Paragraphs
)]
End If
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 71
Select All
Purpose
Selects the entire contents of the active field.
Format
Select All
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Notes
In FileMaker Go, this script step does not highlight text if the keyboard is hidden on the
device.
Example 1
Selects the contents of the active field.
Show Custom Dialog ["Do you want to select the contents of the active
field?"]
If [Get ( LastMessageChoice ) = 1]
Select All
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Partial
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 72
Perform Find/Replace
Purpose
Finds/replaces data according to the options in the Perform Find/Replace Options dialog box.
Format
Perform Find/Replace [With dialog: On/Off; “<text to be found>”;
<replacement text>”; Find Next/Replace & Find/Replace/Replace All]
Options
With dialog specifies whether to display the Find/Replace Summary dialog box at the end
of the find/replace operation. Setting With dialog to Off also prevents display of the
confirmation dialog box when a Replace All operation is executed.
If you want the user to be able to enter find or replace criteria, use the Open Find/Replace script
step.
Perform lets you choose which action you want the find/replace to perform:
Find Next finds an instance of the find term.
Replace & Find finds an instance of the find term, then replaces the term and searches
for the next instance when the script is run again.
Replace replaces highlighted text that matches the find term with the replace term.
When using the Replace action, you may need to pair the Perform Find/Replace script
step with the Select All script step.
Replace All finds and replaces all instances of the find term.
Find what specifies the find term.
Replace with specifies text to replace instances of the find term.
Direction specifies the direction you want the find/replace to search through records.
Match case considers the find term’s case when performing the find.
Match whole words only omits finds where the find term is embedded in another word.
All records/requests finds within all records/requests in the found set.
Current records/requests restricts the find to the current record/request.
All fields finds within every field on the layout.
Current field restricts the find to within the active field. You can use the Go to Field script
step to select the field before the Find/Replace is performed.
Editing script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 73
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If Perform Find/Replace doesn't find data that matches the find term, it doesn’t return an error.
Example 1
Replaces text in the Reorder Level field that matches the find criteria in all records without
prompting the user.
Go to Field [Products::Reorder Level]
Perform Find/Replace [With dialog: Off; 1; 3; Replace All]
Example 2
Goes to the next occurrence of the product name in the Description field.
Show Custom Dialog ["Do you want to find the current product name in the
Description field?"]
If [Get ( LastMessageChoice ) = 1]
Go to Field [Products::Description]
Perform Find/Replace [With dialog: Off; Products::Name; Find Next]
End If
Example 3
Replaces specific terms in the current field with record data.
Show Custom Dialog ["Do you want to replace placeholder terms with record
data?"]
If [Get ( LastMessageChoice ) = 1]
Perform Find/Replace [With dialog: Off; "[NAME]"; Customers::Name;
Replace All]
Perform Find/Replace [With dialog: Off; "[COMPANY]";
Customers::Company; Replace All]
Perform Find/Replace [With dialog: Off; "[ADDRESS]";
Customers::Address; Replace All]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 74
Fields script steps
Fields script steps operate on specific fields. With these script steps, you can:
paste data into fields
import information into fields and export data from fields
evaluate a calculation and assign the result to a field
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 75
Set Field
Purpose
Replaces the entire contents of the specified field in the current record with a calculation result.
Format
Set Field [<table::field>; <value or formula>]
Options
Specify target field specifies the field whose contents you want to replace. If no field is
specified and a field is selected in Browse mode or Find mode, that field is used.
<value or formula> is the calculation whose results will be inserted by this script step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The result of the calculation must match the field type. For example, you can't assign a date
calculation to a container field.
The specified field doesn’t have to be on the current layout.
If the result of the calculation doesn’t match the target field type, and the validate option for
the field is set to Always, the field will not be set and an error code is returned (which can
be captured with the Get(LastError) function).
When possible, the Set Field script step makes the record active and leaves it active until
the record is exited or committed. Scripts that use a series of Set Field script steps should
group these steps together if possible, so that subsequent Set Field script steps can act on
the record without having to lock the record, download and upload data, index the field, and
so on, after each individual Set Field script step. These functions and record level validation
are performed after the record has been exited or committed.
If the target field is a repeating field, you can specify a repetition number or generate a
repetition number from a calculated expression.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 76
Example 1
Inserts the sum of the invoices' grand totals into the Statistics field.
Set Field [Customers::Statistics; Sum ( Invoices::Grand Total )]
Example 2
Demonstrates when to use Set Field instead of Set Field By Name to simplify scripts.
#If the target field does not change, use the Set Field script step.
Set Field [Customers::Work Phone; Credit Collection::Phone Number]
#If you use Set Field by Name with a target field that does not change,
#you must surround the target field in quotation marks so it evaluates as
a literal string
#and returns the specified field name. If you do not use quotation marks,
#Set Field by Name evaluates the specified field and uses the result as
the target field.
#If the result does not specify a field name, nothing happens.
Set Field by Name ["Customers::Work Phone"; Credit Collection::Phone
Number]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 77
Set Field By Name
Purpose
Replaces the entire contents of a calculated target field in the current record with the calculated
value.
Format
Set Field by Name[<calculated target field>; <value or formula>]
Options
Specify target field is a calculation to specify the field whose contents you want to replace.
<value or formula> specifies the calculation whose results will be inserted by this script step.
Compatibility
Originated in
FileMaker Pro 10.0
Description
The Set Field By Name script step lets you create a calculation to specify a field name, then change
the value of the field either literally or based on a second calculation.
Because the target field is calculated, a single Set Field By Name step can replace multiple Set
Field script steps between If conditions.
The calculated target field must return a text result.
If quotation marks are not included around the fully qualified field name, the target field name is
obtained from the named field.
If no field is specified and a field is selected in Browse mode or Find mode, that field is used.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 78
Notes
The specified target field doesn’t have to be on the current layout.
Set Field By Name ignores validation checking.
When possible, the Set Field By Name script step makes the record active and leaves it
active until the record is exited or committed. Scripts that use a series of Set Field By Name
script steps should group these steps together if possible, so that subsequent Set Field By
Name script steps can act on the record without having to lock the record, download and
upload data, index the field, and so on, after each individual Set Field By Name script step.
These functions and record-level validation are performed after the record has been exited
or committed.
Example 1
Identifies the target field (National Statistics or World Statistics) based on geographical location,
then enters a calculated value (the sum of all Grand Totals) in the target field.
Set Field by Name [If ( Customers::Country = "Japan" ; Customers::National
Statistics ; Customers::World Statistics ); Sum ( Invoices::Grand Total )]
Example 2
Demonstrates when to use Set Field By Name instead of Set Field to simplify scripts.
#With Set Field, an If statement with multiple Else If steps is needed
#to determine which field on the Customers table to update
#with information from Credit Collection::Phone Number.
If [Credit Collection::Call Location = "Work"]
Set Field [Customers::Work Phone; Credit Collection::Phone Number]
Else If [Credit Collection::Call Location = "Home" ]
Set Field [Customers::Home Phone; Credit Collection::Phone Number]
Else If [Credit Collection::Call Location = "Mobile" ]
Set Field [Customers::Mobile Phone; Credit Collection::Phone Number]
End If
#A single Set Field by Name script step can perform the same task
#by using a calculation to determine the target field.
Set Field by Name [GetFieldName ( Evaluate ( Credit Collection::Call
Location & " Phone" ) ); Credit Collection::Phone Number]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 79
Set Next Serial Value
Purpose
Resets the next serial value in an auto-entry serial number field.
Format
Set Next Serial Value [<table::field>; <value or formula>]
Options
Specify target field specifies the serial number field on which the script step will operate.
The field you specify must be defined as an auto-entry serial number field.
Calculated result allows you to enter the next serial value or create a calculation to
determine the next serial value.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can define this script step to use any calculation expression to determine the next serial value of
a field that has been defined as an auto-entry serial number field. The calculation always evaluates
to a text result.
For example, you might want to reset the next serial value after you do one of the following:
import records into a FileMaker Pro database with an auto-entry serial number field
delete multiple serialized numbers from a FileMaker Pro database
Notes
This script step affects the definition of the field you specify instead of the actual contents of
the field that you specify.
This script step can operate on multiple files. If you specify a field in another file, then
FileMaker Pro attempts to update the serial number for the specified field in the other file. To
specify a field in another file, define a relationship to that file and use Specify target field to
select a field from that file.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 80
Example 1
Calculates the number of the next available invoice ID, using the Max function to return the highest
value in the Invoice ID field. If an invoice ID contains non-numeric data, then the calculation would
need to be more sophisticated to maintain the numeric and non-numeric data.
Go to Record/Request/Page [Last]
Set Next Serial Value [Invoices::Invoice ID; Max ( Invoices::Invoice ID )
+ 1]
Example 2
Sets the next serial number value in the Invoice ID field options after importing records. Useful if
Perform auto-enter options while importing is not selected in order to preserve dates and other
auto-entered values.
Import Records [Add; Mac Roman]
Set Next Serial Value [Invoices::Invoice ID; Get ( TotalRecordCount ) + 1]
Example 3
Prompts the user to input the next serial value.
Show Custom Dialog ["Set the next serial number value"; Invoices::Next
Serial Value]
If [Get ( LastMessageChoice ) = 1]
Set Next Serial Value [Invoices::Invoice ID; Invoices::Next Serial
Value]
End If
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 81
Insert Text
Purpose
Pastes a text value into a field in the current record.
Format
Insert Text [Select; <table::field>; “<text>”]
Options
Select entire contents replaces the contents of a field. If you do not select this option,
Insert Text inserts the specified value at the end of the field's data.
Go to target field specifies the field to receive the pasted information. If no field is selected,
the Insert Text command will place the specified text after the insertion point. If no field is
active at the time the command executes, it has no effect. Also, if the selected field is not
present on the current Layout, the Insert Text command has no effect.
<text> is the exact value you want to paste.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step pastes text that is specified in the script, instead of text provided by the user.
Notes
This script step is intended to paste text into text field types. To insert other types of data
into other types of fields, use either the Insert Calculated Result script step or the Set Field
script step.
If the specified field does not exist on the layout where the script is being performed, Insert
Text returns an error code which can be captured with the Get(LastError) function.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 82
Example 1
Inserts "Draft" into the Status field.
Insert Text [Select; Invoices::Status; "Draft"]
Example 2
Inserts either "Paid" or "Unpaid" depending on the value of the Payment Date field.
If [ IsEmpty ( Invoices::Payment Date )]
Insert Text [Select; Invoices::Status; "Unpaid"]
Else
Insert Text [Select; Invoices::Status; "Paid"]
End If
Example 3
Inserts "Draft" into the Status field or displays a dialog box if Status is not on the current layout.
Insert Text [Select; Invoices::Status; "Draft"]
If [Get ( LastError ) = 102]
Show Custom Dialog ["Status field is missing on current layout"]
End If
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 83
Insert Calculated Result
Purpose
Pastes the result of a calculation into the current field in the current record.
Format
Insert Calculated Result [Select; <table::field>; <value or formula>]
Options
Select entire contents replaces the contents of a field. If you don't select this option, Insert
Calculated Result replaces only the selected portion of the current field, or inserts the result
at the insertion point. The default insertion point is at the end of the field's data.
Go to target field specifies the field to paste the calculated results into. The target field
must be present on the layout to paste successfully. If no field is active when the script is
performed, the step has no effect.
<value or formula> is the calculation whose results will be inserted by this script step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If the specified field does not exist on the layout where the script is being performed, Insert
Calculated Result returns an error code which can be captured with the Get(LastError) function.
Note If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run this script
step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Inserts the current date if the invoice prints successfully.
Set Error Capture [On]
Print [With dialog: On]
Insert Calculated Result [Select; Invoices::Print Status; If ( Get (
LastError ) = 0 ; "Printed on " & Get ( CurrentDate ) ; "Not Printed" )]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 84
Insert From Device
Purpose
In FileMaker Go, enters content from a device into a field.
Format
Insert from Device [<table::field>; Type: Music Library]
Insert from Device [<table::field>; Type: Photo Library]
Insert from Device [<table::field>; Type: Camera; Camera: Front/Back;
Resolution: Full/Small/Medium/Large]
Insert from Device [<table::field>; Type: Video Camera; Camera: Front/
Back; Resolution: Full/Small/Medium/Large; Max Duration: <value or
formula>; Start immediately]
Insert from Device [<table::field>; Type: Microphone; Max Duration: <value
or formula>; Start immediately]
Insert from Device [<table::field>; Type: Bar Code; Camera: Front/Back;
Resolution: Full/Small/Medium/Large; <table::field>]
Insert from Device [<table::field>; Type: Signature; Title: <value or
formula>; Message: <value or formula>; Prompt: <value or formula>]
Options
Specify target field specifies a container field. For bar codes, you can also specify a text
field. If no field is specified, the currently active field is used if it is a container field or text
field.
Insert from specifies the source type.
For Camera, choose Back or Front.
For Resolution, choose Full, Large, Medium, or Small.
Select Maximum duration to specify the number of seconds a video camera or
microphone records. Click Specify to define a duration from a calculation.
Select Start immediately to have a video camera or microphone start recording
immediately.
For Scan from Camera, choose Back or Front.
For Scan from Field, choose a field.
In the list of Bar code types, select the types of bar codes you want FileMaker Go to
scan. By default, all types are selected.
For Title, enter a title or a calculated value for the signature capture screen.
For Message, enter an informational message or a calculated value for the signature
capture screen.
For Prompt, enter a prompt or a calculated value to indicate the signature line. This
prompt replaces the default "Sign Here."
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 85
Compatibility
Originated in
FileMaker Pro 13.0
Description
This script step enters content into a container field from a music library, photo library, camera, video
camera, microphone, or signature; or enters content into a container field or text field from a bar
code source.
FileMaker Go does not support all types of bar codes.
If the target field is a repeating field, you can specify a repetition number or generate a
repetition number from a calculated expression.
If the target field is a text field, only the text value of the bar code is inserted into the field.
If the target field is a container field, an image of the bar code is inserted into the field. The
text value of the bar code is also stored in the field. You can retrieve the text value of the bar
code with the GetAsText function. You can retrieve the bar code type with the
GetContainerAttribute function.
Notes
In the script editing pane, the selected bar code types are not displayed. To see all settings,
print the script or use the Database Design Report (FileMaker Pro Advanced).
In the Bar Code Options dialog box, select:
EAN-13 to scan ISBN-10 or ISBN-13 bar codes. Also select ISBN-10 (from EAN-13) if
you need to convert a scanned ISBN-13 bar code to the ISBN-10 type.
EAN-13 as well as UPC-A or UPC-E to scan UPC-A or UPC-E bar codes.
Example 1
Inserts a photo taken by the iOS device’s back camera at Full resolution into the File Container field.
Insert from Device [Products::File Container; Type: Camera; Camera: Back;
Resolution: Full]
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 86
Example 2
Inserts an image of a bar code taken by the iOS device’s back camera at Small resolution into the
container field named UPC. To retrieve the text value of the bar code, use GetAsText(UPC).
Insert from Device [Products::UPC; Type: Barcode; Camera: Back;
Resolution: Small]
Example 3
In the container field named Signature, displays a title, message, and prompt in the signature
capture screen.
Insert from Device [Invoice::Signature; Type: Signature; Title:
"Invoice"; Message: "Thank you for your order"; Prompt: "Signature
required"]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 87
Insert From Index
Purpose
Pastes a value from the index into a field.
Format
Insert from Index [Select; <table::field>]
Options
Select entire contents replaces the contents of a field. If you do not select this option,
Insert From Index inserts the result at the cursor position or at the end of the field's data.
Go to target field allows you to specify the field to paste the index value into. The field you
specify may be of any type.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step displays the index for the active field. You can use Insert From Index in Browse or
Find modes.
FileMaker Pro displays the View Index dialog box so the user can select an entry. This method
promotes consistent data entry and correct spelling. For this script step, you can specify a field and
select the entire contents of the field.
FileMaker Pro uses what was last selected for the Show individual words option in the View Index
dialog box (it is not remembered in the script).
Notes
If the specified field does not exist on the layout where the script is being performed, Insert
From Index returns an error code which can be captured with the Get(LastError) function.
If you have turned indexing off for a field and deselected the option to Automatically create
indexes as needed, the index will not display and an error code is returned. For more
information on field indexing see Defining field indexing options.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 88
Example 1
Displays the index for a field in Find mode so the user can select a preexisting value.
Enter Find Mode [Pause: On]
Insert from Index [Customers::Company]
Perform Find [ ]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 89
Insert From Last Visited
Purpose
Pastes data from the last active record into the specified field in the current record or find request.
Format
Insert from Last Visited [Select; <table::field>]
Options
Select entire contents replaces the contents of a field. If you do not select this option,
Insert From Last Visited inserts the result at the insertion point or at the end of the field's
existing data.
Go to target field specifies the field to paste into.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to ensure consistency and automate data entry. The active record is the last
record where FileMaker Pro performed some activity, such as pasting text or moving into a field with
the Go to Field script step.
Notes
If the specified field does not exist on the layout where the script is being performed, Insert
From Last Visited returns an error code which can be captured with the Get(LastError)
function.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Creates a new record and inserts the customer name from the last record that was viewed.
New Record/Request
Insert from Last Visited [Invoices::Customer Name]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 90
Example 2
Inserts the value from the Customer Name field of the last visited record into a find request, pauses
for the user to make modifications, then performs the find.
Enter Find Mode [Pause: Off]
Insert from Last Visited [Invoices::Customer Name]
Pause/Resume Script [Indefinitely]
Perform Find [ ]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 91
Insert From URL
Purpose
Enters the content from a URL into a field.
Format
Insert from URL [Verify SSL Certificates; Select; With dialog: On/Off;
<table::field>; <resource URL>]
Options
Verify SSL Certificates verifies the SSL certificate of the server specified in the URL. If the
certificate cannot be verified, users can choose to connect anyway or cancel to skip this
script step. If the certificate cannot be verified and the Set Error Capture script step is set to
On, Insert From URL behaves as if the server were unavailable.
Select entire contents replaces the contents of a field. If you do not select this option,
Insert From URL inserts the content from the URL at the insertion point or at the end of the
field's data.
With dialog specifies whether to display the “Insert from URL” Options dialog box when the
script step is performed.
Go to target field specifies the field to insert the URL content into.
Specify URL allows you to type the URL or to create your URL from a calculation.
Automatically encode URL replaces special characters with the corresponding encoded
values required for URLs. For example, a space character is replaced with %20. When this
option is deselected, the URL remains as it is entered.
Compatibility
Originated in
FileMaker Pro 12.0
Description
Insert From URL supports http, https, httppost, httpspost, ftp, ftps, and file protocols. FileMaker Pro
downloads the resource that is specified by the URL to the target field.
For a list of picture and audio/video formats supported in container fields, see Using data in
container fields.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 92
Important For better performance in FileMaker WebDirect, be sure that Select entire contents is
selected.
Notes
Insert From URL supports UTF-8 only.
In FileMaker WebDirect:
If the With dialog option is On, this script step runs as if Automatically encode URL is
selected.
If Select entire contents is deselected, and Insert From URL inserts content into a text
field, the contents from the URL are appended to the text field. Multiple fetches can
result in unpredictable results and slower performance.
httppost and httpspost are custom schemes defined by FileMaker Pro that enable you to
send HTTP POST data. See About importing data using an HTTP request.
If the specified field doesn’t exist on the layout where the script is being performed, Insert
From URL returns an error code, which can be captured with the Get(LastError) function.
Example 1
Accesses a website and inserts a PDF into the Sales Report container field.
Insert from URL [With dialog: Off; Customers::Sales Report; “http://
www.filemaker.com/sales_report.pdf”]
Example 2
Inserts a map showing the customer's address in the Address Map container field.
Insert from URL [With dialog: Off; Customers::Address Map; "http://
maps.google.com/maps/api/staticmap?center=" & Customers::Address &
"&zoom=14&markers=" & Customers::Address & "&size=256x256&sensor=false"]
Example 3
Inserts the HTML code for http://www.apple.com.
Insert from URL [With dialog: Off; Customers::HTML Website Code; "http://
www.apple.com"]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 93
Insert Current Date
Purpose
Pastes the current system date into the specified field.
Format
Insert Current Date [Select; <table::field>]
Options
Select entire contents replaces the contents of a field with the current date. If you do not
select this option, Insert Current Date adds the value of the current date to the end of the
field's existing data.
Go to target field specifies the field to paste the date into.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
To perform a calculation with the current date, make sure the receiving field is defined as a
date field.
If the specified field does not exist on the layout where the script is being performed, Insert
Current Date returns an error code which can be captured with the Get(LastError) function.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Goes to the Email History layout, inserts the current date in the Last Sent field, then goes to the
original layout.
Go to Layout ["Email History"]
Insert Current Date [Select; Emails::Last Sent]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 94
Insert Current Time
Purpose
Pastes the current system time into the specified field.
Format
Insert Current Time [Select; <table::field>]
Options
Select entire contents replaces the contents of a field with the current time. If you do not
select this option, Insert Current Time adds the value of the current time to the end of the
field's existing data.
Go to target field specifies the field to paste into.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
To perform a calculation with the current time, make sure the receiving field is defined as a
Time field.
If the specified field does not exist on the layout where the script is being performed, Insert
Current Time returns an error code which can be captured with the Get(LastError) function.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Goes to the Email History layout, inserts the current time in the Last Sent field, then goes to the
original layout.
Go to Layout ["Email History"]
Insert Current Time [Select; Emails::Last Sent]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 95
Insert Current User Name
Purpose
Pastes the current user name into the specified field in the current record.
Format
Insert Current User Name [Select; <table::field>]
Options
Select entire contents replaces the contents of a field with the current user name. If you do
not select this option, Insert Current User Name adds the value of the current user name to
the end of the field's existing data.
Go to target field specifies the field to paste into.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If the specified field does not exist on the layout where the script is being performed, Insert
Current User Name returns an error code which can be captured with the Get(LastError)
function.
User name is the FileMaker Pro user, an editable field displayed on the General tab of the
Preferences dialog box. To track user access to a database with more security, use the
Get(AccountName) function to return the current user’s account name.
In FileMaker WebDirect, Insert Current User Name pastes the current user’s account name,
not the current user name.
If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run
this script step in FileMaker WebDirect, use the Set Selection script step.
Example 1
Goes to the Email History layout, inserts the current user name in the Sent by field, then goes to the
original layout.
Go to Layout ["Email History"]
Insert Current User Name [Select; Emails::Sent by]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 96
Insert Picture
Purpose
Imports a graphic from another file into the current container field.
Format
Insert Picture [Reference;“<filename>”]
Options
Store only as a reference instructs FileMaker Pro to store only a link to the graphic file
instead of the entire file. This option may reduce the size of your FileMaker Pro file, but if
you move or delete the graphic, FileMaker Pro will be unable to display it.
Specify source file identifies the file that contains the graphic. The file path must begin with
image, imagemac, or imagewin. See Creating file paths.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You must specify a field, click in a field, or use the Go to Field script step before performing this
script step.
When Insert Picture is performed, unless a file is specified with the Specify source file option,
FileMaker Pro displays a dialog box where the user can select and preview the file to be imported.
Notes
FileMaker WebDirect does not support the Store only as a reference or Specify source
file options.
If there is no active container field on the layout where the script is being performed, Insert
Picture returns an error code that can be captured with the Get(LastError) function.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 97
Example 1
Goes to the Picture field and inserts a picture.
Go to Field [Products::Picture]
Insert Picture ["Mobile Phone.png"]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 98
Insert Audio/Video
Purpose
Imports an audio or video file, or a file reference, into the current interactive container.
Format
Insert Audio/Video [Reference;“<filename>”]
Options
Store only as reference instructs FileMaker Pro to store only a link to an audio or video file
in the container field instead of the actual file. This option may reduce the size of your
FileMaker Pro file, but if you move or delete the file being referenced, FileMaker Pro won't
be able to display it.
Specify source file specifies the audio or video file you intend to insert in the interactive
container. The file path must begin with movie, moviemac, or moviewin. See Creating file
paths.
Compatibility
Originated in
FileMaker Pro 12.0
Description
You must specify a field, click in a field, or use the Go to Field script step before performing this
script step.
When Insert Audio/Video is performed, unless a file is specified with the Specify source file option,
FileMaker Pro displays a dialog box where the user can select and preview the file to be imported.
Note FileMaker WebDirect does not support the Store only as reference or Specify source file
options.
Notes
If there is no active container field on the layout where the script is being performed, Insert
Audio/Video returns an error code that can be captured with the Get(LastError) function.
This script step works only for interactive containers. For more information, see Specifying
formats for container fields.
For a list of supported media types, see Using data in container fields.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 99
Example 1
Goes to the Media field and inserts an audio file.
Go to Field [Customers::Media]
Insert Audio/Video [“Music.mp3”]
Example 2
Inserts the media file specified in the Media Name field into the active container field by reference.
Set Variable [$MEDIA_PATH; Value: Get ( DocumentsPath ) & Products::Media
Name]
Insert Audio/Video [Reference; “$MEDIA_PATH”]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 100
Insert PDF
Purpose
Imports a PDF file or file reference into the current interactive container.
Format
Insert PDF [Reference;“<filename>”]
Options
Store only as reference instructs FileMaker Pro to store a link to a PDF file in the container
field instead of the actual file. This option may reduce the size of your FileMaker Pro file, but
if you move or delete the file being referenced, FileMaker Pro won't be able to display it.
Specify source file allows you to specify the PDF file you intend to insert in the interactive
container. The file path must begin with image, imagemac, or imagewin. See Creating file
paths.
Compatibility
Originated in
FileMaker Pro 12.0
Description
You must specify a field, click in a field, or use the Go to Field script step before performing this
script step.
When Insert PDF is performed, unless a file is specified with the Specify source file option,
FileMaker Pro displays a dialog box where the user can select and preview the file to be imported.
Notes
FileMaker WebDirect does not support the Store only as reference or Specify source file
options.
If there is no active container field on the layout where the script is being performed, Insert
PDF returns an error code that can be captured with the Get(LastError) function.
This script step works only with interactive containers. For more information, see Specifying
formats for container fields.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 101
Example 1
Goes to the File field and inserts a PDF.
Go to Field [Products::File]
Insert PDF [“Product Description.pdf”]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 102
Insert File
Purpose
Imports a file or file reference into the current container field; configures the Insert File dialog box.
Format
Insert File [<dialog options>;<table::field>;”<filename>”]
Options
Dialog options allows you to create a custom Insert File dialog box, filter file types, and
choose storage, display, and compression options for files that are inserted into a container
field. See Insert File Options dialog box.
Go to target field specifies the container field to insert the file into.
Specify source file specifies the file to be inserted. For information on creating file paths in
FileMaker Pro, see Creating file paths.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You must specify a target field, click in a field, or use the Go to Field script step before performing
this script step. If you do not specify a file to insert, FileMaker Pro displays a dialog box where the
user can select a file.
Notes
If there is no active container field on the layout where the script is being performed, Insert
File returns an error code that can be captured with the Get(LastError) function.
FileMaker WebDirect does not support the Dialog options or Specify source file options.
FileMaker Go uses the following options in the Insert File Options dialog box with this script
step: for Storage options, it uses Insert; and for Display, it uses Content of file (when
possible).
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 103
Example 1
Goes to the File field and inserts a document.
Go to Field [Products::File]
Insert File ["Instruction Manual.doc"]
Example 2
Opens a dialog box with custom file format filters for the user to select a file, attempts to compress
the selected file, then inserts the file into the active container field.
Insert File [Filters; Insert; Compress when possible]
Example 3
Inserts the file specified in the File Name field into the File container field, and attempts to display
the contents of the file.
Set Variable [$FILE_PATH; Value: Get ( DocumentsPath ) & Products::File
Name]
Insert File [Insert; Display content; Never compress; Products::File ;
$FILE_PATH]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 104
Replace Field Contents
Purpose
Replaces the value in a field in every record in the found set with a different value.
Format
Replace Field Contents [With dialog: On/Off; <table::field>;
Current contents/Serial numbers/Calculation results]
Options
With dialog specifies whether to display the Replace Field Contents dialog box when the
script step is performed.
Specify target field specifies the target field for the replace operation.
Replace with "current contents" uses the current value in the specified field as the
replacement value to place in that field in every other record in the current found set.
Replace with serial numbers reserializes the field in every record in the current found set.
Entry options uses the next available value in Entry Options as the first record number,
incrementing with whatever value is in Entry Options.
Custom Values lets you enter a value to be used as a starting point for the
serialization, as well as a value by which to increment each serialized field in the current
found set.
Update serial number in Entry Options? resets the serial number value in Entry
Options so that the next serial number that is automatically entered will follow the
records you have reserialized with this script step. If this option is not used, the serial
value in Entry Options is not changed, and may not be in sequence with the newly
reserialized records.
If the field to be replaced was set up for auto-entry of a serial number and Prohibit
modification of value is not selected, FileMaker Pro will still put sequential numbers in the
selected field, but will do so starting with the next number to be automatically entered.
Replace with calculated result displays the Specify Calculation dialog box, where you can
enter a calculation to be used as the replacement value.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Partial
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 105
Description
This script step uses the value in a specified field in the current record or uses a calculation to
replace the value in that field in every record in the current found set.
Important Replace Field Contents modifies all records in the found set. You cannot undo a Replace
Field Contents script step.
This script step can also be used to reserialize a field in every record in the current found
set.
When you use the Replace Field Contents script step, the data must be committed first
before the operation is performed, or you may get unexpected results. See Committing data
in records.
FileMaker WebDirect, server-side scripts, and Custom Web Publishing run this script step
as if the With dialog option is set to Off.
FileMaker Go does not support the With dialog: On option.
Example 1
Assigns serial numbers to all invoices in the found set.
Sort Records [Restore; With dialog: On]
Go to Record/Request/Page [First]
Replace Field Contents [With dialog: Off; Invoices::Invoice ID; Serial
numbers]
Example 2
Replaces the contents of the Customer ID field in all records in the found set with the contents of the
current record's Customer ID field.
Perform Find [Restore]
Replace Field Contents [With dialog: Off; Invoices::Customer ID; Current
Contents]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 106
Relookup Field Contents
Purpose
Copies new values from the lookup source field into the current found set.
Format
Relookup Field Contents [With dialog: On/Off; <table::field>]
Options
With dialog specifies whether to display a dialog box when the script step is performed,
allowing users to confirm field information.
Go to target field specifies the field that is the target of the relookup operation.
FileMaker Pro moves the cursor to the field you specify. This must be the match field for the
relationship upon which the lookup is based, not the lookup source field or lookup target
field. If no field is selected, Relookup Field Contents returns an error code that can be
captured with the Get(LastError) function.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The target field specified for the Relookup Field Contents step must be an editable field.
Relookups are only performed on the found set of records in the active table.
Calculation fields cannot be used for the Relookup Field Contents command. If you use the
Relookup Field Contents command, and you're using a calculation field as the matching
value, you must specify one of the input fields for the calculation as the field parameter for
the Relookup Field Contents.
When you use the Relookup Field Contents script step, the data must be committed first
before the operation is performed, or you may get unexpected results. See Committing data
in records.
Server-side scripts and Custom Web Publishing run this script step as if the With dialog
option is set to Off.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 107
Example 1
Finds records that have matching values in the Customer ID field, then updates all lookups in the
found set based on the relationship that uses Customer ID as a match field.
Go to Layout [“Invoice Details"]
Find Matching Records [Replace; Invoices::Customer ID]
Relookup Field Contents [With dialog: Off; Invoices::Customer ID]
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 108
Export Field Contents
Purpose
Exports the contents of a single field in the active record to a new file.
Format
Export Field Contents [<table::field>; “<filename>”; Automatically open;
Create email]
Options
Specify target field specifies the field to be exported. If no field is specified, FileMaker Pro
will export the contents of the current field in the active table.
Specify output file specifies the name and location of the file to which the field contents will
be exported. For more information, see Creating file paths. If no file is specified, the user is
asked to choose a filename and location when the script step is performed. You can choose
to Automatically open file or Create email with file as attachment after saving.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If the contents of the exported field is text, then FileMaker creates a UTF-16 format text file.
Notes
FileMaker WebDirect does not support the Specify output file option. FileMaker WebDirect
exports field contents to the web browser’s default download location.
FileMaker WebDirect does not support this script step in mobile browsers.
FileMaker Go export text as a UTF-8 format text file.
Example 1
Opens a dialog box to set the export path and filename, then exports the image.
Export Field Contents [Products::Picture; ”Mobile Phone.png”]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Fields script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 109
Example 2
Exports files from the Container field in all the records in the found set to a set file path.
Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Export Field Contents [Products::Container; "$PATH"]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 110
Records script steps
Records script steps affect specific records and find requests. Use these script steps to:
add, delete, and copy records or find requests
change field contents in all records in the found set
commit and revert records
import and export records
save records to various formats
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 111
New Record/Request
Purpose
Creates a new, blank record or a new find request.
Format
New Record/Request
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
In Browse mode, this script step creates a new, blank record. In Find mode, it creates a new find
request.
Example 1
Goes to the Invoice Details layout, creates a record, and goes to the Summary field.
Go to Layout [“Invoice Details”]
New Record/Request
Go to Field [Invoices::Summary]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 112
Duplicate Record/Request
Purpose
Duplicates the current record or the current find request.
Format
Duplicate Record/Request
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
In Browse mode, this script step makes a duplicate of the current record. In Find mode, it duplicates
the current find request.
If the record has a field set up for automatic entry of values, this script step does not duplicate the
value in the field of the current record. In that case, FileMaker Pro generates and enters a new value
for the duplicated record.
To use the Duplicate Record/Request script step with portal rows, first use the Go to Portal Row
script step, and then use the Duplicate Record/Request step. Using the Duplicate Record/Request
step when a portal row is selected will duplicate the selected row in the related table. This option is
only available when the option to allow creation of related records has been enabled for the
relationship.
Example 1
Performs a find, goes to the last record, and duplicates the record.
Perform Find [Restore]
Go to Record/Request/Page [Last]
Duplicate Record/Request
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 113
Delete Record/Request
Purpose
Deletes the current record or find request.
Format
Delete Record/Request [With dialog: On/Off]
Options
With dialog specifies whether to display a dialog box when the script step is performed, asking
users to confirm deletion of the record or request.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
In Browse mode, this script step deletes the current record. In Find mode, it deletes the current find
request.
To delete Do this
A master record Make sure that the record you want to delete is active (use navigation script steps),
and then use Delete Record/Request. If the current layout contains a portal, click
anywhere on the record outside of the portal to make sure that no related record is
selected, then use Delete Record/Request.
A related record Perform Delete Record/Request in a portal row, or use the Delete Portal Row script
step.
A find request Make sure that the find request you want to delete is active (use navigation script
steps), and then use Delete Record/Request.
Important You cannot undo a Delete Record/Request script step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 114
Example 1
Goes to a related record and asks if the user wants to delete it.
Go to Related Record [From table: "Products"; Using layout: “Product
Details”]
Delete Record/Request [With dialog: On]
Example 2
Displays a custom dialog box to ask if the user wants to delete the current product.
Show Custom Dialog ["Do you want to delete " & Products::Name & "?"]
If [Get ( LastMessageChoice ) = 1]
Delete Record/Request [With dialog: Off]
End If
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 115
Delete Portal Row
Purpose
Deletes the selected portal row (which deletes data in a related record).ts
Format
Delete Portal Row [With dialog: On/Off]
Options
With dialog specifies whether to display a dialog box when the script step is performed, asking
users to confirm deletion of the portal row.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use the Go to Portal Row script step to control which row is selected. (If no portal row is selected,
nothing happens when this script step executes.)
Note After you use a Delete Portal Row script step in FileMaker WebDirect, click anywhere on the
layout or use a Commit Records/Requests script step to commit the deletion.
Important You cannot undo a Delete Portal Row script step.
Example 1
Asks if the user wants to delete the portal row if a product is discontinued.
If [Products::Availability = "Discontinued"]
Delete Portal Row [With dialog: On]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 116
Example 2
Asks if the user wants to delete the product in the current portal row.
Show Custom Dialog ["Do you want to delete " & Products::Name & "?"]
If [Get ( LastMessageChoice ) = 1]
Delete Portal Row [With dialog: Off]
End If
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 117
Delete All Records
Purpose
Deletes all the records in the current found set.
Format
Delete All Records [With dialog: On/Off]
Options
With dialog specifies whether to display a dialog box when the script step is performed, asking
users to confirm deletion of all records.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Important You cannot undo deleting records.
Delete All Records attempts to lock a group of records in the found set before deleting them. If it can
lock all records in the group, this script step deletes the group of records, attempts to lock the next
group of records, and so on. The first time it can’t lock all records in a group (for example, if a record
is being edited by another user), Delete All Records stops and returns an error code (which can be
captured with the Get(LastError) function).
Notes
To delete all records in the current table, use the Show All Records script step, then use
Delete All Records.
Example 1
Asks if the user wants to delete all records in the current table.
Show All Records
Delete All Records [With dialog: On]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 118
Example 2
Asks if the user wants to delete all records in the current found set.
Show Custom Dialog ["Do you want to delete all " & Get ( FoundCount ) & "
records found?"]
If [Get ( LastMessageChoice ) = 1]
Delete All Records [With dialog: Off]
End If
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 119
Open Record/Request
Purpose
Makes an existing record or find request available for editing if the current user has record-editing
privileges.
Format
Open Record/Request
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step makes an existing record available (in Browse mode) or an existing find request
available (in Find mode) for editing if the current user has record-editing privileges. When performed
on a record, this script step verifies that the user has sufficient access privileges to edit the record. If
the user has the proper privilege set, FileMaker Pro attempts to prevent others from simultaneously
editing or deleting the record. Once locked, the record is considered “opened” and may be edited.
If an error occurs (for example, if the current user has insufficient access privileges, the record is
currently locked by another user, or the record is open in another window), FileMaker Pro generates
an error message, which may be captured using the Set Error Capture script step and the
Get(LastError) function. (Opening a find request will not return an error, because requests can’t be
locked by other users.)
Important Because any attempt to modify a field or a record will also attempt to open the record for
editing, in most cases you will not need to use the Open Record/Request script step to open a
record explicitly. But when using the Go to Record/Request/Page script step to enter a field or
record, use the Open Record/Request script step first to obtain a write lock.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 120
Example 1
Prints the current invoice if the user has the privileges to edit it.
Go to Layout ["Print Invoices"]
Open Record/Request
If [Get ( LastError ) = 0]
Print [With dialog: On]
End If
Go to Layout [original layout]
Example 2
Checks if the current user account has the privilege to edit records. If not, asks if the user wants to
log in to a different account.
Note This script does not run properly if it is set to run with full access privileges because this
allows any account to open the record.
Set Error Capture [On]
Go to Layout ["Invoice Details"]
Open Record/Request
If [Get ( LastError ) = 200]
Show Custom Dialog ["You cannot edit this record. Do you want to re-
login?"]
If [Get ( LastMessageChoice ) = 1]
Re-Login [With dialog: On]
Else
Go to Layout [original layout]
End If
End If
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 121
Revert Record/Request
Purpose
Returns the current record or find request to the way it was before editing began.
Format
Revert Record/Request [With dialog: On/Off]
Options
With dialog displays a dialog box when the script step is performed, asking users to confirm the
revert action.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Displays a dialog box if the current record has been modified but not committed. Gives the user the
option of reverting the record.
If [Get ( RecordOpenState ) = 2]
Show Custom Dialog ["This record has been modified since it was last
entered."]
#Button 1 is Commit. Button 2 is Revert.
If [Get ( LastMessageChoice ) = 2]
Revert Record/Request [With dialog: Off]
End If
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 122
Commit Records/Requests
Purpose
Commits a record or find request.
Format
Commit Records/Requests [Skip data entry validation; With dialog: On/Off;
Force Commit]
Options
Skip data entry validation overrides any data entry validation options set for fields and
commits the record anyway. This option only skips validation for fields set with the Only
during data entry validation option in the Options for Field dialog box; fields set to Always
validate will still validate, even if the Skip data entry validation option is selected. See
Defining field validation.
With dialog specifies whether to display a dialog box when the script step is performed,
asking users to confirm the commit action.
Note Setting With dialog to Off only applies when Save record changes automatically is
cleared in the Layout preferences.
Override ESS locking conflicts allows clients of ODBC data sources to force-commit
changes when optimistic locking otherwise prevents the commit action. ODBC data sources
are also referred to as external SQL sources (ESS).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step exits the current record or find request, updating field data and making no field active.
Example 1
Goes to the Invoice Details layout, inserts the current date into the Date field, and commits the
record.
Go to Layout ["Invoice Details"]
Insert Calculated Result [Invoices::Date; Get ( CurrentDate )]
Commit Records/Requests [With dialog: Off]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 123
Copy Record/Request
Purpose
Copies the values of a record or find request to the Clipboard.
Format
Copy Record/Request
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Text fields are copied in tab-delimited format, without styles, in the order they appear in the record
layout. Text in container fields is also copied. (This script step is equivalent to choosing Copy from
the Edit menu when there is no active field.)
Notes
Contents that you cut or copy to the Clipboard are accessible to other applications.
When using the Copy Record/Request step with repeating fields, FileMaker Pro inserts the
group separator character between each repetition. You can use a text editor to replace
these characters with another delimiter such as a tab or space.
Any fields located in popovers are ignored when you copy records.
Example 1
Copies the contents of the current record and displays a custom dialog box.
Copy Record/Request
Show Custom Dialog ["You can now paste the current record in your
spreadsheet software."]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 124
Copy All Records/Requests
Purpose
Copies the values of all records or the search criteria in all find requests to the Clipboard.
Format
Copy All Records/Requests
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
In Browse mode, this script step copies the values of all records to the Clipboard. In Find mode, it
copies all find requests to the Clipboard.
Text fields are copied in tab-delimited format, without styles, in the order they appear in the record
layout. Text in container fields is also copied. (This script step is equivalent to choosing Copy from
the Edit menu while holding down the Shift key (Windows) or Option key (OS X) when there is no
active field.)
Notes
Contents that you cut or copy to the Clipboard are accessible to other applications.
When using the Copy All Records/Requests step with repeating fields, FileMaker Pro
inserts the group separator character between each repetition. You can use a text editor to
replace these characters with another delimiter such as a tab or space.
Any fields located in popovers are ignored when you copy records.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 125
Example 1
Finds all records with the same Customer ID as the current record, sorts, copies the contents of all
the records in the found set, and displays a dialog box.
Find Matching Records [Replace; Invoices::Customer ID]
Sort Records [Restore; With dialog: Off]
Copy All Records/Requests
Show Custom Dialog ["You can now paste data from the current " & Get (
FoundCount ) & " invoices."]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 126
Import Records
Purpose
Imports records from a specified file or data source.
Format
Import Records [Verify SSL Certificates; With dialog: On/Off; “<source or
filename>”; Add/Update existing/Update matching; <platform and character
set>]
Options
Verify SSL Certificates verifies the SSL certificate of the server specified in an HTTP
request for XML data. If the certificate cannot be verified, users can choose to connect
anyway or cancel to skip this script step. If the certificate cannot be verified and the Set
Error Capture script step is set to On, this script step behaves as if the server were
unavailable.
With dialog specifies whether to display import-related dialog boxes when the script step is
performed. However, if a data source file has not been specified, the Open File dialog box is
displayed when a script is run.
Specify data source specifies the file or source of the data to be imported. Depending on
the file or source you choose, a dialog box may appear for specifying the following
additional options:
When you
choose this file
or source Do this
File In the Specify File dialog box, choose the file you want to import, or type file paths
directly into the list. Specify one path per line. FileMaker Pro will use the first path
it locates as the file to import. See Creating file paths.
Folder In the Folder of Files Import Options dialog box, choose the folder of image or
text files that you want to import, or type the folder paths directly into the list.
Specify one path per line. FileMaker Pro will use the first path it locates as the
folder to import. For more information, see Importing a folder of files all at once
and Creating file paths. This option is not supported from scripts running on
FileMaker Server.
XML Data In the Specify XML and XSL Options dialog box, choose the source of the XML
data that you want to import, and choose an XSLT style sheet if you want to apply
one prior to import. The XML and XSLT source may be a file or the result of an
HTTP request, or a calculation that generates a file path or an HTTP request. For
more information, see Importing XML data.
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 127
Specify import order tells FileMaker Pro to use a predefined import order. The last import
order used in the file appears as the default and can be edited. This option also lets you
choose whether to keep repeating field data together or to split repeating fields into
separate records, as well as whether to add new records, replace data in the current found
set, or import data as a new table.
Note When import source fields and target fields are mapped using matching names, field
name matching is performed dynamically each time the script step is performed.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can set the import order and use the Specify import order option, or perform this script step
with the dialog box so the user can set new criteria, such as importing data as a new table.
If the source file is open, the found set is imported; if not, all records in the source table are
imported.
If you include this script step in a server-side script and you do not set With dialog to Off, the text
(NOT compatible) appears after the script step. The script, however, will run. The behavior will be
the same as if With dialog is Off. See Get(DocumentsPathListing) function for more information.
If you run a server-side script to do any of the following, you will receive an error:
importing records to new table
importing records from a folder
importing images to a container field
ODBC Data Specify the data source name and location, the user ID and password (if any),
and the SQL query to be executed. You can enter a query directly or specify a
calculation to generate the query. For more information, see Automating ODBC
import using the Import Records script step.
SQL statements are limited to a maximum length of 256 K characters (512 KB).
Note If you use the Import Records script step to import ODBC data that
contains Unicode strings, your ODBC driver must support Unicode. Otherwise,
the results may be inconsistent.
When you
choose this file
or source Do this
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 128
Notes
When using the Import Records script step or Export Records script step in a server-side
script, keep the following in mind:
Any specified file must be in the FileMaker Server Documents folder, the temporary
folder, or a child folder of either the FileMaker Server Documents folder or the
temporary folder. For example, the following are all valid paths for file.csv:
<Documents>/file.csv
<Temporary Path>/file.csv
<Documents>/Folder1/file.csv
<Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv
Any path specified that isn’t a complete path to the file (for example, anything other than
/Macintosh HD/Library/FileMaker Server/Data/Documents/<0 or more directories>/
<filename> ) is evaluated as being relative to the temporary path.
Any paths that include “..” are considered invalid.
For FileMaker Pro, if an absolute path is not specified in a script that will be executed from
FileMaker Pro, the path is assumed to be relative to the location of the database file from
which the script was run. For example, if a script containing the Export Records script step
is run with the pathname file:/export.tab, and the file running the script is /MyFiles/
Library/Books.fmp12, the exported file will be created as /MyFiles/Library/export.tab.
Support for importing photos from a digital camera or device has been removed from
FileMaker Pro.
If a script created in an earlier version of FileMaker Pro contains an Import Records
[Digital Camera] script step, the step is commented as obsolete. You can remove the
step, but you can’t edit it.
If a button references an Import Records [Digital Camera] script step, the button is
disabled and the Import Records script step is commented as obsolete in the Button
Setup dialog box.
FileMaker Go only supports importing from one FileMaker Pro file to another FileMaker Pro
file.
FileMaker Go does not support importing to a new table.
When using this script step in FileMaker WebDirect, keep the following in mind:
FileMaker WebDirect does not support this script step in mobile browsers.
FileMaker WebDirect does not support the With dialog or Specify data source
options.
FileMaker WebDirect only supports importing from Comma-Separated Text, Tab-
Separated Text, DBF, Merge, and Excel file formats.
Example 1
Imports information from New Product Catalog.xlsx as new records without prompting the user.
Go to Layout ["Products"]
Import Records [With dialog: Off; Source: "New Product Catalog.xlsx";
Worksheet: "Stock"; Add; Mac Roman]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 129
Example 2
Updates existing records with information from New Product Catalog.xlsx.
Go to Layout ["Products"]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Import Records [With dialog: Off; Source: "New Product Catalog.xlsx";
Worksheet: "Stock"; Update matching; Mac Roman]
Example 3
Sets the next serial value after importing records. Useful when Perform auto-enter options while
importing is not selected to preserve dates and other auto-entries.
Go to Layout ["Products"]
Import Records [With dialog: Off; Source: "New Product Catalog.xlsx";
Worksheet: "Stock"; Add; Mac Roman]
Set Next Serial Value [Invoices::Invoice ID; Get ( TotalRecordCount ) + 1]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 130
Export Records
Purpose
Exports records to a specified file.
Format
Export records [With dialog: On/Off; “<output filename>”; Automatically
open; Create email; <platform and character set>]
Options
With dialog specifies whether to display dialog boxes when the script step is performed.
These dialog boxes let the user set new export criteria.
Specify output file allows you to specify the file and file type to export. Choose the folder
you want to export to, or type the folder path directly into the list. Specify one path per line.
FileMaker Pro will use the first path it locates. See Creating file paths. The file type you use
depends on the import requirements of the program using the exported data. You can also
specify options to Automatically open the file and Create email with the file as
attachment after saving.
If FileMaker Pro executes a script that does not specify an absolute path, and the database file
containing the script is hosted, the path is assumed to be the current user’s Documents folder.
Note You can export records as a Microsoft Excel worksheet by choosing Excel Workbooks
(.xlsx). For more information on saving FileMaker Pro files as Excel files, see Saving and
sending records as an Excel file.
If you specify XML as the export file type, the Specify XML and XSL Options dialog box appears,
where you can specify an XML grammar and choose an XSLT style sheet if you want to
transform the XML. The XSLT source may be a file, the result of an HTTP request, or a
calculation that generates a file path or an HTTP request.
Note Do not export fields whose name is entirely numeric (such as "2") or whose name is a
single-byte kana character (Japanese version) using the FMPDSORESULT grammar.
Specify export order uses the export order that was in effect when you added the script
step. The last export order used in the file appears as the default and can be edited or
deleted. If necessary, choose an output file character set from the list. Select Apply current
layout’s data formatting to exported data, or the formatting of the last exported data will
be used.
Compatibility
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 131
Originated in
FileMaker Pro 6.0 or earlier
Description
You can set the export order before adding this script step, or perform the step with a dialog box so
a user can set new criteria. Export Records exports all the records currently being browsed. If you
want to limit the set of records you're exporting, use a find request before using Export Records.
If you include this script step in a server-side script and you do not set With dialog to Off, the text
(NOT compatible) appears in the script step. The script, however, will run. The behavior will be the
same as if With dialog is Off. See Get(DocumentsPathListing) function for more information.
Notes
When using the Export Records script step or Import Records script step in a server-side
script, keep the following in mind:
Any specified file must be in the FileMaker Server Documents folder, the temporary
folder, or a child folder of either the FileMaker Server Documents folder or the
temporary folder. For example, the following are all valid paths for file.csv:
<Documents>/file.csv
<Temporary Path>/file.csv
<Documents>/Folder1/file.csv
<Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv
Any path specified that isn’t a complete path to the file (for example, anything other than
/Library/FileMaker Server/Data/Documents/<0 or more directories>/<filename> ) is
evaluated as being relative to the temporary path.
Any paths that include “..” are considered invalid.
Export to .fmp12 is not supported.
In FileMaker Go, exporting to .fmp12 and XML formats is not supported.
When using this script step in FileMaker WebDirect, keep the following in mind:
FileMaker WebDirect does not support this script step in mobile browsers.
FileMaker WebDirect does not support exporting to .fmp12, XML, or Excel formats.
If the Specify output file option is selected, FileMaker WebDirect outputs exported
records with the specified filename and file type but ignores the specified file path.
FileMaker WebDirect outputs exported records to the web browser’s default download
location.
If field data or record data is too long for the export format, the Get(LastError) function
returns 0 rather than 736.
Example 1
Finds and sorts records, then exports the found set as an Excel file without prompting the user.
Go to Layout ["Invoices"]
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Export Records [With dialog: Off; "Unpaid Invoice List.xlsx"; Unicode
(UTF-16)]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 132
Example 2
Exports the found set as an Excel file unless a file with that name already exists in the output
directory.
If [not PatternCount ( Get ( DocumentsPathListing ); "Unpaid Invoice
List.xlsx" )]
Export Records [With dialog: Off; "Unpaid Invoice List.xlsx"; Unicode
(UTF-16)]
End If
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 133
Save Records As Excel
Purpose
Saves records to a specified Excel worksheet.
Format
Save Records as Excel [Restore; With dialog: On/Off; “<output filename>”;
Automatically open; Create email; Records being browsed/Current record]
Note In order to save records as a Microsoft Excel worksheet, your privilege set must include Allow
exporting, or you must set the script to run with full access privileges.
Options
With dialog specifies whether the Excel Options dialog box will display when the script step
is performed, if you have already specified a file. If you have not specified a file, the Save
Records as Excel dialog box will display as the script step is performed, but the Excel
Options dialog box will not display.
Specify output file specifies the file path. Choose the folder you want to export to, or type
the file path directly into the list. Specify one path per line. FileMaker Pro will use the first
path it locates. See Creating file paths. You can choose to Automatically open file or
choose to Create email with file as attachment to create a blank email with the Excel file
as an attachment.
If FileMaker Pro executes a script that does not specify an absolute path, and the database file
containing the script is hosted, the path is assumed to be the current user’s Documents folder.
Specify options displays the "Save Records as Excel" Options dialog box. From the Save
list, choose Records being browsed or Current record. Specify whether the values in the
first row should be used as field names or as data. For Worksheet, Title, Subject, and
Author, you can enter text directly, or click Specify to enter a field name or values from a
calculation.
Compatibility
Originated in
FileMaker Pro 8.0
Description
This script step operates in all modes except Find mode.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 134
Example 1
Finds and sorts records, then saves the found set as an Excel file without prompting the user.
Go to Layout ["Invoices"]
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Save Records as Excel [With dialog: Off; "Unpaid Invoice List.xlsx";
Records being browsed]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 135
Save Records As PDF
Purpose
Saves records to a specified PDF file.
Format
Save Records as PDF [Restore; Append; With dialog: On/Off; “<output
filename>”; Automatically open; Create email; Records being browsed/
Current record/Blank record, as formatted/with boxes/with underlines]
Note To save records as a PDF file, your privilege set must include Allow printing, or you must set
the script to run with full access privileges.
Options
Append to existing PDF appends the records being browsed, the current record, or a
blank record after the last page of the specified PDF file. When you append records, the
PDF Options dialog box settings in the Document and Initial View tabs are ignored, but the
settings in the Security tab are maintained.
With dialog specifies whether to display dialog boxes when the script step is performed, if a
file has already been specified.
Specify output file allows you to specify the file path. Choose the folder you want to save
to, or type the file path directly into the list. Specify one path per line. FileMaker Pro will use
the first path it locates. See Creating file paths. You can choose to Automatically open file
or you can choose to Create email with file as attachment after saving.
If FileMaker Pro executes a script that does not specify an absolute path, and the database file
containing the script is hosted, the path is assumed to be the current user’s Documents folder.
Specify options displays the "Save Records as PDF" Options dialog box. From the Save
list, choose Records being browsed, Current record, or Blank record. If you select
Blank record, the Appearance list is enabled. The Appearance list allows you to specify
formatting options for fields: as formatted in FileMaker, with boxes, with underlines, or with
placeholder text.
Select Options to display the PDF Options dialog box.
In the Document tab, you can specify descriptive information for the PDF file. For each
of the options in the document tab, you can enter text directly, or click Specify to enter a
field name or values from a calculation.
In the Security tab, you can assign passwords to the PDF file, as well as print and edit
privileges. If print and edit privileges are allowed, you can specify if copying and screen
reading software are permitted.
In the Initial View tab, you can define the initial view for the layout and magnification for
the PDF file.
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 136
Compatibility
Originated in
FileMaker Pro 8.0
Description
This script step operates in all modes except Find mode.
Note OS X: Save Records As PDF is not supported in runtime solutions. However, users can print
the current record to PDF by choosing File menu > Print > PDF.
Notes
If you don’t specify the output file path, FileMaker Go uses the name of the window to save
the PDF file.
The following options aren’t supported in FileMaker Go:
appending records to an existing PDF
options in the Security tab and Initial View tab of the PDF Options dialog box
Example 1
Goes to the Products layout, shows all records, sorts the records, and saves the records as a PDF
without prompting the user.
Go to Layout ["Products"]
Show All Records
Sort Records [Restore; With dialog: Off]
Save Records as PDF [With dialog: Off; "Product Catalog.pdf"; Records
being browsed]
Example 2
Finds all invoices with the current record's Customer ID, sorts, saves the invoices to a PDF, and
appends the products purchased by the customer to the PDF.
Go to Layout ["Invoices"]
Find Matching Records [Replace; Invoices::Customer ID]
Sort Records [Restore; With dialog: Off]
Save Records as PDF [With dialog: Off; "Customer Backup.pdf"; Records
being browsed]
Go to Related Record [Show only related records; Match found set; From
table: "Products"; Using layout: “Products”]
Save Records as PDF [Append; With dialog: Off; "Customer Backup.pdf";
Records being browsed]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 137
Save Records As Snapshot Link
Purpose
Saves a found set of records to a FileMaker Pro Snapshot Link (FMPSL) file.
Format
Save Records as Snapshot Link [“<output filename>”; Create email; Records
being browsed/Current record]
Options
Specify output file allows you to enter the path of the snapshot link. Specify one path per
line. FileMaker Pro will use the first path it locates. See Creating file paths. You can also
select Create email with file as attachment to create a blank email with the snapshot link
as an attachment.
If FileMaker Pro executes a script that does not specify an absolute path, and the database file
containing the script is hosted, the path is assumed to be the current user’s Documents folder.
Records being browsed saves the entire found set of records.
Current record saves only the current record.
Compatibility
Originated in
FileMaker Pro 11.0
Description
This script step operates in all modes except Find mode.
To send a snapshot link file via SMTP, use the Send Mail script step with the snapshot link file as an
attachment, and place it after the Save Records As Snapshot Link script step in the script.
Use this script step with the Get(TemporaryPath) function to save the snapshot link file to a
temporary location, if you do not need to store the file locally. If you use Get(TemporaryPath) to form
a file path, first assign it to a variable, then use the variable in the Specify Output File dialog box.
See Creating file paths.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution No
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 138
Notes
FileMaker WebDirect does not support the Specify output file option. FileMaker WebDirect
saves snapshot links to the web browser’s default download location.
If you don’t specify the output file path, FileMaker Go uses the name of the file to save the
snapshot link file.
You can open a snapshot link file on multiple iOS devices if:
the FileMaker Pro file is stored on each device.
the snapshot link file was created in FileMaker Go.
the original FileMaker Pro file and the local copy of the file have matching filenames and
are at the same relative location.
Example 1
Saves the current record as a snapshot link and asks where the user wants to save the snapshot
link file.
Save Records as Snapshot Link [Current record]
Example 2
Saves the found set as a snapshot link in a temporary directory, then creates an email with the
snapshot link as an attachment.
Set Variable [$PATH; Value: Get ( TemporaryPath ) & "Invoices.fmpsl"]
Save Records as Snapshot Link ["$PATH"; Create email; Records being
browsed]
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 139
Truncate Table
Purpose
Deletes all records in the specified table regardless of the current found set.
Format
Truncate Table [With dialog: On/Off; <Current Table>/Table: “<table
name>”]
Options
With dialog specifies whether to display a dialog box when the script step is performed,
asking the user to confirm the deletion of records.
Current Table is the active table when this script step is performed.
Specify Table lets you choose a table in the current file.
Compatibility
Originated in
FileMaker Pro 15.0
Description
Important You cannot undo deleting all records.
Truncate Table attempts to lock all records in the table before deleting them. If it can't lock all
records (for example, if a record is being edited by another user), Truncate Table stops and returns
an error code (which can be captured with the Get(LastError) function).
This script step may be faster than the Delete All Records script step for deleting a large number of
records.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Records script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 140
Notes
Truncate Table does not delete related records even if the relationship is set up to do so
(see Creating and changing relationships). To delete related records as well, use Delete All
Records instead.
If you choose Current Table and the active table when this script step is performed is from
an ODBC data source, Truncate Table is skipped and returns an error code. If the active
table is from an external FileMaker data source, Truncate Table performs normally.
Server-side scripts and Custom Web Publishing run this script step as if the With dialog
option is Off.
Example 1
After asking the user, deletes all records in the table named Invoices.
Truncate Table [With dialog: On; Table: “Invoices”]
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 141
Found Sets script steps
With Found Sets script steps, you can:
specify a find request to find records
extend or constrain the found set
modify the most recent find request
show all records
omit records from the found set
sort and unsort records
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 142
Perform Find
Purpose
Finds records using the current or stored find requests.
Format
Perform Find [Restore]
Options
The Specify Find Requests dialog box allows you to create and manage find requests. The requests
you create are stored with the script step. For more information, see Specify Find Requests and Edit
Find Request dialog boxes.
New opens the Edit Find Request dialog box, where you define criteria for a find request.
Edit opens a selected find request from the list.
Duplicate duplicates one or more selected find requests from the list.
Delete deletes one or more selected find requests from the list.
The Edit Find Request dialog box allows you to create or edit find request criteria.
For Action, select Find Records or Omit Records to specify whether this find request will
find or omit records. Finding records adds them to your found set. Omitting records
excludes them. An individual request can find or omit records; use multiple requests if you
need to find and omit records during the same Perform Find script step.
Find records when (or Omit records when) shows a list of the fields in your current table.
To construct a find request, begin by selecting a field from this list.
To select a field from a related table, click the name of the current table at the top of the
list and select the related table you want. Select a related field from this new list.
Change the value in Repetition to specify a particular cell of a repeating field.
Type your search criteria for the selected field in the Criteria area.
Click Insert Operator to further refine your search criteria. See Finding records.
Click Add to add your criteria to the find request.
To change existing criteria, select the line containing the field and criteria from the top of the
dialog box, and make your changes to field and/or criteria. Click Change to store your
changes.
To delete existing criteria, select the line containing the field and criteria from the top of the
dialog box and click Remove.
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 143
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can use Perform Find with or without specifying a find request in the script step:
If you specify one or more find requests, this script step enters Find mode, performs the
specified find requests, then enters Browse mode.
If you don’t specify a find request:
In Find mode, this script step performs the current find requests, then enters Browse
mode.
In any other mode, this script step enters Find mode, performs the last find request that
was executed, then enters Browse mode.
You can use Perform Find following an Enter Find Mode script step, either pausing the script to allow
the user to enter find criteria or using the Set Field script step to specify find criteria before
performing a find.
Example 1
Goes to the Invoice Details layout, enters Find mode, pauses for user input, performs a find, and
returns to the original layout.
Go to Layout ["Invoice Details"]
Enter Find Mode [Pause: On]
Perform Find [ ]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 144
Example 2
Goes to Find mode, sets the Date field to the current date, and performs the find. Displays the
Invoice Details layout, Invoices layout, or a custom dialog box depending on how many records
were found with today’s date.
Set Error Capture [On]
Enter Find Mode [Pause: Off]
Set Field [Invoices::Date; Get(CurrentDate)]
Perform Find [ ]
If [Get ( FoundCount ) = 1]
Go to Layout ["Invoice Details"]
Else If [Get ( FoundCount ) > 1]
Go to Layout ["Invoices"]
Else
Show Custom Dialog ["No records were found."]
End If
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 145
Perform Quick Find
Purpose
Performs a quick find based on text you specify or on text returned by a calculation.
Format
Perform Quick Find [<value or formula>]
Options
<value or formula> specifies the search text.
Compatibility
Originated in
FileMaker Pro 11.0
Description
This script step finds records that match one or more search words based on text that you specify or
text returned by a calculation.
You can use the Get(QuickFindText) function to pass the text that is typed in the quick find box to the
Perform Quick Find script step.
Example 1
Performs a quick find with the contents of the Custom Quick Find field, sorts the found set, and goes
to the first record. Started by the OnObjectSave script trigger.
Perform Quick Find [Invoices::Custom Quick Find]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Example 2
Goes to the Invoice Details layout and performs a quick find using the text in the quick find box. If no
records are found, displays a custom dialog box. Useful with a custom menu item that performs
quick finds.
Go to Layout ["Invoice Details"]
Perform Quick Find [Get ( QuickFindText )]
If [Get ( LastError ) = 401]
Show Custom Dialog ["No records match " & Get ( QuickFindText )]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 146
Constrain Found Set
Purpose
Narrows the existing found set using the current or stored find requests.
Format
Constrain Found Set [Restore]
Options
The Specify Find Requests dialog box allows you to create and store a find request with the script
step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is equivalent to a logical AND search. Otherwise, Constrain Found Set is similar to
the Perform Find script step.
Note If no records match the find criteria, this script step returns a found set of zero records.
Example 1
Constrains the found set to paid invoices or shows all records.
Show Custom Dialog ["Display only paid invoices?"]
If [Get ( LastMessageChoice ) = 1]
Enter Find Mode [Pause: Off]
Set Field [Invoices::Status; "Paid"]
Constrain Found Set [ ]
Else
Show All Records
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 147
Extend Found Set
Purpose
Broadens the existing found set using the current or stored find requests.
Format
Extend Found Set [Restore]
Options
The Specify Find Requests dialog box allows you to create and store a find request with the script
step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is equivalent to a logical OR search. Otherwise, Extend Found Set is similar to the
Perform Find script step.
Example 1
Extends the found set to include unpaid invoices.
Show Custom Dialog ["Include unpaid invoices in the found set?"]
If [Get ( LastMessageChoice ) = 1]
Enter Find Mode [Pause: Off]
Set Field [Invoices::Status; "Unpaid"]
Extend Found Set [Restore]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 148
Modify Last Find
Purpose
Changes the most recent find request.
Format
Modify Last Find
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Modify Last Find runs in Find mode. If the database is in another mode when the script runs,
FileMaker Pro switches to Find mode before running the script.
Example 1
Performs a find. If no records were found, modifies the find request.
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Modify Last Find
End If
Example 2
Performs a find, then sorts the found set. If no records were found, allows the user to modify the find
request.
Set Error Capture [On]
Enter Find Mode [Pause: On]
Perform Find [ ]
If [Get (LastError) = 401]
Modify Last Find
Else
Sort Records [Restore; With dialog: Off]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 149
Show All Records
Purpose
Finds all records in the table underlying the foreground window and selects the current record.
Format
Show All Records
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to redisplay all the records after working with a found set.
Use Show All Records in Browse mode or Preview mode. If you perform this script step in Find
mode or Layout mode, FileMaker Pro switches to Browse mode after the records have been found.
Example 1
Goes to the Invoices layout, shows all records, and performs a sort.
Go to Layout [“Invoices”]
Show All Records
Sort Records [Restore; With dialog: Off]
Example 2
Performs a find, shows all records if no records were found, and sorts the found set.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show All Records
End If
Sort Records [Restore; With dialog: Off]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 150
Show Omitted Only
Purpose
Finds the records not in the current found set.
Format
Show Omitted Only
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step in Browse mode or Preview mode. If you perform this script step in Find mode or
Layout mode, FileMaker Pro switches to Browse mode after the records have been found.
Example 1
Shows all omitted records.
Show Custom Dialog ["Show omitted records?"]
If [Get ( LastMessageChoice ) = 1]
Show Omitted Only
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 151
Example 2
Demonstrates that using the Find Matching Records script step instead of Show Omitted Only can
be a simpler way to create a found set of only the current record.
#With Show Omitted Only, multiple steps are necessary
#to create a new found set, omit the current record,
#and show only the omitted record.
Show All Records
Omit Record
Show Omitted Only
#A single Find Matching Records script step can perform the same task
#when a field with unique values, such as an Invoice ID field, is
specified.
Find Matching Records [Replace; Invoices::Invoice ID]
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 152
Omit Record
Purpose
Omits the current record from the found set and selects the next record in the table.
Format
Omit Record
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step omits (temporarily hides) the current record from the found set and makes the next
record in the table the current record.
Omit Record only operates in Browse mode and Find mode. When this script step is performed in
Find mode, it causes the find request to become an Omit request, as if Omit had been clicked.
Example 1
Omits the current record from the found set if it was created before the current date.
If [Invoices::Date Created < Get ( CurrentDate )]
Omit Record
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 153
Omit Multiple Records
Purpose
Omits several records from the found set, starting with the current record, and selects the next
record in the table.
Format
Omit Multiple Records [With dialog: On/Off; <number of records>]
Options
With dialog specifies whether to display a dialog box when the script step is performed,
asking users to enter the number of records to be omitted.
If With dialog is Off and you do not specify the number of records, only the current record is
omitted.
Specify records specifies the exact number of records you want to omit. The calculation
result must be a number.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step omits (temporarily hides) several records from the found set, starting with the current
record, and makes the next record in the table the current record.
If this script step is performed from Layout mode, FileMaker Pro switches to Browse mode after the
script step has been performed.
Example 1
Omits all records in the current found set.
Go to Record/Request/Page [First]
Omit Multiple Records [With dialog: Off; Get ( FoundCount )]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 154
Sort Records
Purpose
Sorts the records in the current found set according to specified criteria.
Format
Sort Records [Restore; With dialog: On/Off]
Options
With dialog specifies whether to display a dialog box when the script step is performed,
allowing users to enter different sort instructions.
Specify sort order allows you to create a sort order and store it with the script step. When
Specify sort order is not selected, FileMaker Pro uses the most recently executed sort
instructions.
Keep records in sorted order places a new or changed record that’s in sorted order into
the adjusted order after the record is committed. When this option is not selected, new or
changed records stay in the same position in the sort order until a find request is performed
or the records are sorted by different criteria.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Find the records you want to sort (using Perform Find script step or Show All Records script step)
before using this script step. If you sort a repeating field, FileMaker Pro sorts on only the first entry in
that field. You don't need to use the Enter Browse Mode script step or Go to Record/Request/Page
script step after using Sort Records.
Each Sort Records script step can store a unique sort order; the sorting instructions are stored with
the step, not the script. You can use this step several times within the same script and store a
different sort order for each occurrence.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 155
Notes
Items in the sort order that aren’t valid when the script step is performed are ignored. When
you specify a sort order in a database containing multiple tables, FileMaker Pro stores the
table name for each sort field in the sort order. For example, a sort order using the Last
Name field of the Contacts table is stored in the sort order as Contacts::Last Name. If the
Sort Records script step is performed when a table other than Contacts is the active table,
Contacts::Last Name cannot be evaluated, and is ignored in the sort order.
Server-side scripts and Custom Web Publishing run this script step as if the With dialog
option is set to Off, so you must use the Specify sort order option to save the sort order in
this script step.
Example 1
Goes to the Invoices layout, performs a find, sorts the records, then goes to the first record in the
found set.
Go to Layout ["Invoices"]
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 156
Sort Records by Field
Purpose
Sorts the records in the current found set according to the context of a specified field.
Format
Sort Records by Field[Ascending/Descending/Associated value list;
<table::field>]
Options
Specify target field specifies the field you want to sort by.
Ascending displays data in ascending order.
Descending displays data in descending order.
Associated value list displays data in the order determined by the value list associated
with the field.
Compatibility
Originated in
FileMaker Pro 12.0
Description
Sorts the records in the current found set according to the context of a specified field, letting you
create scripts that behave similarly to interactively using the shortcut menu in Table View. If you do
not specify a field, the script sorts by the field that is active when the script runs. If there is no active
field when the script runs, FileMaker Pro displays an invalid sort order alert.
Tip You can find the records you want to sort (using Perform Find script step or Show All Records
script step) before using this script step. You don't need to use the Enter Browse Mode script step or
Go to Record/Request/Page script step after using Sort Records by Field.
Example 1
Sorts the current found set by the active field. Can be started by the OnObjectValidate script trigger
to maintain the current found set's sort order when field values change.
Sort Records by Field [Ascending]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 157
Example 2
Shows invoices for the current customer ID, with the most recent invoice listed first.
Find Matching Records [Replace; Invoices::Customer ID]
Sort Records by Field [Descending; Invoices::Invoice ID]
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 158
Unsort Records
Purpose
Restores the records in the current found set to the order in which the records were entered.
Format
Unsort Records
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step when it's important to maintain the original creation order, as with invoices
entered by invoice number or membership records entered by date.
Note You don't need to perform an Unsort Records script step before executing a Sort Records
script step.
Example 1
Goes to the Print Invoices layout, sorts the records, prints, returns to the original layout, then unsorts
the records.
Go to Layout ["Print Invoices"]
Sort Records [Restore; With dialog: Off]
Print [With dialog: Off]
Go to Layout [original layout]
Unsort Records
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 159
Find Matching Records
Purpose
Finds records based on the context of a specified field.
Format
Find Matching Records[Replace/Constrain/Extend; <table::field>]
Options
Specify target field specifies the field you want to search by.
Replace searches the entire database and replaces the current found set with records that
match the contents of the active field.
Constrain searches the found set and displays matching records based on the contents of
the active field (a logical AND search).
Extend broadens your found set to include additional records that match criteria in the
specified field (a logical OR search).
Compatibility
Originated in
FileMaker Pro 12.0
Description
Finds records based on the context of a specified field, letting you create scripts that behave
similarly to using the shortcut menu in Table View.
If you do not specify a field, FileMaker Pro searches based on the contents of the field that is active
when the script runs. If data is selected in the active field, FileMaker Pro searches for the selected
data. If data is not selected, FileMaker Pro searches for the entire contents of the active field. If you
do not specify a field and there is no active field when the script runs, FileMaker Pro displays an
invalid command alert.
Find Matching Records runs in Browse or Preview modes. If the database is in another mode when
the script runs, FileMaker Pro switches to Browse mode before running the script.
Find Matching Records can be copied and pasted or imported into other FileMaker Pro files.
Note If you manually select field data before you run this script step in FileMaker WebDirect, the
script step performs as if you did not make a selection. To select field data before you run this script
step in FileMaker WebDirect, use the Set Selection script step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Found Sets script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 160
Example 1
Finds all records with the same category as the current record, then switches to Table View.
Find Matching Records [Replace; Products::Category]
View As [View as Table]
Example 2
Opens a new window, goes to the Invoices layout, finds all records in the found set with the same
Customer ID as the current record, sorts the new found set, and goes to the first record.
New Window [Style: Document]
Go to Layout ["Invoices"]
Find Matching Records [Constrain; Invoices::Customer ID]
Sort Records [Restore; With dialog: Off]
Go to Record/Request/Page [First]
Example 3
Either extends the found set with records matching the current record's Customer ID or creates a
new found set with records matching the current record's Customer ID.
Show Custom Dialog ["Do you want to add the current customer to the found
set?"]
If [ Get ( LastMessageChoice ) = 1 ]
Find Matching Records [Extend; Invoices::Customer ID]
Else
Find Matching Records [Replace; Invoices::Customer ID]
End If
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 161
Windows script steps
Windows script steps affect screen elements and windows. You can:
open or close a window
select a window
arrange windows
move or resize a window
update a window
freeze a window
scroll a window
show or hide a window, the status toolbar, or the text ruler
set the title of a window
set the zoom level
view data as a list, table, or form
refresh a window
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 162
New Window
Purpose
Creates a new window based on the foreground window.
Format
New Window[Style: Document/Floating Document/Dialog; Name: <name of
window>; Height: n; Width: n; Top: n; Left: n]
Options
You can choose one of the following window styles:
Document Window opens a document window.
Floating Document Window opens a floating document window.
Dialog Window opens a dialog window.
You can specify these window settings:
Window Name is the name for the new window. Window names do not have to be unique.
Height is the height of the new window, in points.
Width is the width of the new window, in points.
Distance from Top is the new window’s distance, in points, from the top of the
FileMaker Pro window (Windows) or the top of the screen (OS X).
Distance from Left is the new window’s distance, in points, from the left of the
FileMaker Pro window (Windows) or the left of the screen (OS X).
You can set these window controls:
Close enables the close button in the window’s title bar.
Minimize enables the minimize button in a window’s title bar.
Maximize enables the maximize button in the window’s title bar.
Zoom Control Area enables the zoom control and Mode pop-up menu at the bottom left of
the window.
Resize allows users to resize the window.
Compatibility
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Partial
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 163
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step creates a new document window, floating document window, or dialog window
based on the active window.
It is not necessary to enter values for each option. When no value is entered, FileMaker Pro uses
the default value associated with the Window menu > New Window command.
See Working with windows and About window styles.
Notes
In FileMaker WebDirect and Custom Web Publishing, this script step opens a new virtual
window in the web browser. Inactive virtual windows remain open but are not visible. To
change the current (active) virtual window, use the Select Window script step. Window style
settings are not supported.
FileMaker Go does not support the Floating Document and Dialog window style options.
Also, FileMaker Go does not support the options for positioning and resizing windows,
because it always displays document windows in full screen.
Example 1
Goes to the Customers layout in a new window and sorts by the Customer ID field.
New Window [Style: Document; Top: Get ( WindowTop ) + 25; Left: Get (
WindowLeft ) + 25]
Go to Layout ["Customers"]
Sort Records by Field [Descending; Customers::Customer ID]
Example 2
Goes to the Print Invoices layout in a new floating window and enters Preview mode.
New Window [Style: Floating Document; Name: "Print Invoices"; Top: Get (
WindowTop ) + 25; Left: Get ( WindowLeft ) + 25]
Go to Layout ["Print Invoices"]
Enter Preview Mode [Pause: Off]
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 164
Select Window
Purpose
Specifies a window by name and makes it the foreground window.
Format
Select Window [Current Window/Name:<name of window>; Current file]
Options
Current Window brings the active window of the file that contains the script to the
foreground.
Window Name specifies which window you want FileMaker Pro to bring to the foreground.
Current file only restricts matches to the current file (not selecting this option matches all
available FileMaker Pro files).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Because FileMaker Pro script steps are always performed in the foreground table, it is sometimes
necessary to bring a specific window to the front. Use this script step when you are working with
scripts in multi-table files to make certain that a script step is performed in the intended table.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 165
Notes
In FileMaker WebDirect and Custom Web Publishing, this script step displays the specified
virtual window in the web browser window. The previous virtual window remains open when
it is not displayed.
Window name selection is not case-sensitive. This script will select the first matching
window and bring it to the front.
The Select Window script step does not open a window of a related file when the related file
is opened in a hidden state, such as when a file is opened because it is the source file of a
related field. To use the Select Window script step with this type of related file, open the
related file using the Open File script step.
For example, a layout in the file Data Entry contains a related field from the file Companies.
When this layout is displayed, FileMaker Pro opens the Companies file in a hidden state. To
open a new window displaying the hidden related file, use a script such as:
Open File[Open Hidden; "Companies"]
Select Window[Name: "Companies"]
To return the file to its original state, perform a Close Window [] script step to close the open
window.
Select Window can make visible a hidden related file if the script step is executed from
within the hidden file.
Example 1
Selects the Print Invoices window. If the Print Invoices window is not open, creates a new window
and goes to the Print Invoices layout.
Select Window [Name: "Print invoices"]
If [Get ( LastError ) = 112]
New Window [Name: "Print Invoices"; Style: Floating Document]
Go to Layout ["Print Invoices"]
End If
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 166
Close Window
Purpose
Closes the currently active window or any other window by name.
Format
Close Window [Current Window/Name: <name of window>; Current file]
Options
Current Window closes the active window.
Window Name specifies which window you want FileMaker Pro to close.
Current file only restricts matches to the current file (not selecting this option matches all
available FileMaker Pro files).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Closing the last window of a file closes the file and halts execution of the current script. In
FileMaker WebDirect, closing the last window logs out the current web session.
Example 1
Goes to a related record in the Invoices table using the Print Invoices layout, prints, and closes the
window.
Go to Related Record [Show only related records; From table: "Invoices";
Using layout: “Print Invoices”; New Window]
Print [Restore: Printer; With dialog: Off]
Close Window [Current Window]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 167
Example 2
Closes the current window if it is hidden.
If [Get ( WindowVisible ) = 0]
Close Window [Current Window]
End If
Example 3
Closes the Invoice Details window if it is open.
If [PatternCount ( WindowNames ( Get ( FileName ) ) ; "Invoice Details" )]
Close Window [Name: "Invoice Details"]
End If
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 168
Adjust Window
Purpose
Hides or changes the size of a window.
Format
Adjust Window [Resize to fit/Maximize/Minimize/Restore/Hide]
Options
Resize to fit resizes the window to the minimum size possible while keeping all items in the
layout visible.
Maximize resizes the window to its maximum size.
Minimize reduces the window to an icon on the taskbar (Windows) or Dock (OS X).
Restore returns the window to its previous size.
Hide hides the current database window from view. This option is equivalent to the Hide
Window menu command
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Notes
If a window is hidden using this script step, FileMaker Go does not hide the window, but it
moves the window to the end of the list of open windows.
OS X: This script step has no effect on a full-screen window, and returns an error code.
Example 1
Goes to the Print Invoices layout, enters Preview mode, and resizes the window to fit the viewing
area.
Go to Layout ["Print Invoices"]
Enter Preview Mode [Pause: Off]
Adjust Window [Resize to Fit]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 169
Move/Resize Window
Purpose
Adjusts the size or location of the chosen window.
Format
Move/Resize Window [Current Window/Name: <name of window>; Current file;
Height: <n>; Width: <n>; Top: <n>; Left: <n>]
Options
Current Window selects the current foreground window when the script step is performed.
Window Name selects an open window by name.
Current file only restricts matches to the current file (not selecting this option matches all
available FileMaker Pro files).
Height is the height of the adjusted window in points.
Width is the width of the adjusted window in points.
Distance from top is the adjusted window’s distance in points from the top of the screen
(OS X) or top of the FileMaker Pro window (Windows).
Distance from left is the adjusted window’s distance in points from the left of the screen
(OS X) or left of the FileMaker Pro window (Windows).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The adjusted window maintains the same layout, same table, same found set, and same current
record as the original window.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 170
Notes
Window name selection is not case-sensitive.
It is not necessary to enter values for each option. When no value is entered, FileMaker Pro
uses the original location and size of the window as default values.
Minimum window height and width depend on the script user’s operating system. If the
height and width values you specify are less than the minimum, FileMaker Pro uses the
minimum values.
Maximum window height and width depend on the script user’s screen resolution. If the
height or width values you specify are greater than the maximum, FileMaker Pro uses the
maximum value possible.
You can move a window off-screen by supplying negative top and/or left values, which can
be useful for multiple monitor environments.
Windows: FileMaker Pro orients the moved window to the top-left corner of the visible part
of the application window. Note that this may not be the (0,0) point of the window,
depending on how the current file window is positioned (for example, if half of the file
window extends past the left border of the application window, you would need to scroll to
the left to see the (0,0) point of the application window).
OS X: This script step has no effect on a full-screen window, and returns an error code.
Example 1
Goes to the Customer Info layout, positions the window in the top-left corner of the FileMaker Pro
window (Windows) or the top-left corner of the screen (OS X), and resizes the window.
Go to Layout ["Customer Info"]
Move/Resize Window [Current Window; Height: 400; Width: 600; Top: 0; Left:
0]
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 171
Arrange All Windows
Purpose
Adjusts the size and location of all open windows.
Format
Arrange All Windows [Tile Horizontally/Tile Vertically/Cascade
Window/Bring All To Front]
Options
Tile Horizontally positions open windows in a left/right orientation. Windows are resized to
prevent overlapping.
Tile Vertically positions open windows in a top/bottom orientation. Windows are resized to
prevent overlapping.
Cascade Window positions windows in an overlapping pattern, beginning in the top-left
corner of the screen. Windows are resized to fill the screen, less any offset.
Bring All to Front (OS X) moves all open FileMaker Pro windows to the front. Windows are
not resized.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The size and location of the open windows are the only things that change; current table, active
window, and active record are not affected by this script step.
Example 1
Opens a new window, goes to the Invoices layout, and arranges all FileMaker Pro windows in an
overlapping pattern.
New Window [Name: "Invoice List"; Style: Document]
Go to Layout ["Invoices"]
Arrange All Windows [Cascade Window]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 172
Example 2
Opens two windows and arranges them top to bottom.
New Window [Name: "Invoice List"; Style: Document]
Go to Layout ["Invoices"]
New Window [Name: "Customer List"; Style: Document]
Go to Layout ["Customers"]
Arrange All Windows [Tile Vertically]
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 173
Freeze Window
Purpose
Stops updating the active window.
Format
Freeze Window
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use Freeze Window to hide actions from the user while FileMaker Pro performs the remainder of
the script. Use a Refresh Window or a Pause/Resume script step to resume updating the active
window after a Freeze Window script step.
Note A Refresh Window step is not needed if it would be the last step in a script. FileMaker Pro
automatically turns off Freeze Window and refreshes the display when a script ends. Use Refresh
Window to force a window update within a script.
Example 1
Freezes the window, goes to the Print Invoices layout, prints, and returns to the original layout.
Freeze Window
Go to Layout ["Print Invoices"]
Print [Restore: Printer; With dialog: Off]
Go to Layout [original layout]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 174
Example 2
Freezes the window, then copies data from the Work Phone field to the Day Contact field in all
records.
Freeze Window
Go to Record/Request/Page [First]
Loop
Set Field [Customers::Day Contact; Customers::Work Phone]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 175
Refresh Window
Purpose
Updates the entire contents of the active window, including any related records.
Format
Refresh Window [Flush cached join results; Flush cached external data]
Options
Flush cached join results deletes the results of queries for related records and causes
related records to be refreshed. Do not select this option if you know your script does not
affect related data, and if you want to minimize the performance impact of re-accessing
related data (particularly when sharing a database over a network).
Flush cached external data deletes the results of queries for related ODBC data source
records and causes related ODBC records to be refreshed. FileMaker Pro dumps the
internal cache and refreshes record data. Do not select this option if you know your script
does not access ODBC data.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step updates the entire contents of the active window, including any related records, and
updates the visibility state of all objects with hidden conditions in the window. Refresh Window also
resumes updating the active window after a Freeze Window script step.
You do not need to select Flush cached join results in order to refresh the entire window.
This script step updates records (rows) in the current ODBC table.
Notes
To update a single layout object without updating the entire window, use the Refresh Object
script step.
In FileMaker WebDirect, this script step closes all open popovers.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 176
Example 1
Updates the Total field to include taxes and beeps after all records are updated.
Go to Record/Request/Page [First]
Loop
Set Field [Invoices::Total; Invoices::Total * Invoices::Tax]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Refresh Window [ ]
Beep
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 177
Scroll Window
Purpose
Scrolls a window or layout vertically, or brings the current field into view.
Format
Scroll Window [Home/End/Page Up/Page Down/To Selection]
Options
Home, End, Page Up, or Page Down scrolls the window to the beginning, to the end, up a
page, or down a page.
To Selection brings the current field into view (similar to tabbing into a field).
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step scrolls a window up or down, scrolls to the top or bottom of a layout, or brings the
current field into view.
Example 1
Goes to the Invoices layout, scrolls to the bottom of the window, and creates a new record.
Go to Layout ["Invoices"]
Scroll Window [End]
New Record/Request
Example 2
Performs a find, sorts, and scrolls to the top of the window.
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Scroll Window [Home]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 178
Show/Hide Menubar
Purpose
Shows or hides the menu bar in FileMaker WebDirect and FileMaker Go.
Format
Show/Hide Menubar [Lock; Show/Hide/Toggle]
Options
Lock prevents the state of the menu bar from being changed (FileMaker Go only).
Show tells FileMaker WebDirect or FileMaker Go to show the menu bar.
Hide tells FileMaker WebDirect or FileMaker Go to hide the menu bar.
Toggle switches between showing and hiding the menu bar.
Compatibility
Originated in
FileMaker Pro 13.0
Example 1
If the Guest account is logged in, goes to the Invoices layout and hides the menu bar and status
toolbar.
If [Get ( AccountName ) = "[Guest]"]
Go to Layout ["Invoices"]
Show/Hide Menubar [Hide]
Show/Hide Toolbars [Hide]
End If
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution No
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 179
Show/Hide Toolbars
Purpose
Shows or hides the FileMaker Pro status toolbar and the FileMaker Go toolbar and editing toolbar.
Format
Show/Hide Toolbars [Lock; Include Edit Record Toolbar; Show/Hide/Toggle]
Options
Lock prohibits the user from manually showing or hiding the FileMaker Pro status toolbar or
the FileMaker Go toolbar.
Include Edit Record Toolbar turns the FileMaker Go editing toolbar on or off.
Show shows the FileMaker Pro status toolbar and FileMaker Go toolbar.
Hide hides the FileMaker Pro status toolbar and FileMaker Go toolbar.
Toggle switches between showing and hiding the FileMaker Pro status toolbar (equivalent
to clicking Show/Hide Status Toolbar) and FileMaker Go toolbar.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Enters Find mode, shows the status toolbar, pauses for user input, performs the find, and hides the
status toolbar.
Enter Find Mode [Pause: Off]
Show/Hide Toolbars [Show]
Pause/Resume Script [Indefinitely]
Perform Find [ ]
Show/Hide Toolbars [Hide]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 180
Show/Hide Text Ruler
Purpose
Shows or hides the text ruler.
Format
Show/Hide Text Ruler [Show/Hide/Toggle]
Options
Show tells FileMaker Pro to show the text ruler.
Hide tells FileMaker Pro to hide the text ruler.
Toggle switches between showing and hiding the text ruler.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The text ruler is used to format paragraphs and tabs within fields and on layouts.
Example 1
Goes to the Description field on the Product Details layout and shows the text ruler.
Go to Layout ["Product Details"]
Go to Field [Products::Description]
Show/Hide Text Ruler [Show]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 181
Set Allowed Orientations
Purpose
Controls the orientation of FileMaker Go and layouts displayed in FileMaker Go.
Format
Set Allowed Orientations [Portrait: On/Off; Portrait Upside Down: On/Off;
Landscape Left: On/Off; Landscape Right: On/Off]
Options
By default, all orientations are selected. If only one option is selected:
Portrait rotates FileMaker Go and all layouts and content to portrait orientation.
Portrait Upside Down rotates FileMaker Go and all layouts and content to portrait upside
down orientation.
Landscape Left rotates FileMaker Go and all layouts and content to landscape left
orientation.
Landscape Right rotates FileMaker Go and all layouts and content to landscape right
orientation.
Compatibility
Originated in
FileMaker Pro 14.0
Description
Specify one to four orientations for FileMaker Go and all layouts and content.
Example 1
When an iOS device is rotated, changes the orientation for FileMaker Go and all layouts and content
to portrait upside down only.
Set Allowed Orientations [Portrait: Off; PortraitUpsideDown: On;
LandscapeLeft: Off; LandscapeRight: Off]
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 182
Set Window Title
Purpose
Changes the title of a window.
Format
Set Window Title [Current Window/Name: <name of window>; Current file; New
Title: <new window name>]
Options
Current Window renames the current foreground window when the script step is
performed.
Window Name selects an open window by name.
Current file onlyrestricts matches to the current file (not selecting this option matches all
available FileMaker Pro files).
Rename Window specifies the new title for the window.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can change the name of any open window.
Note Window name selection is not case-sensitive.
Example 1
Performs a find and sets the window title to display the number of records that were found.
Perform Find [Restore]
Set Window Title [Current Window; New Title: Get ( FoundCount ) & "
records found"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 183
Set Zoom Level
Purpose
Enlarges or reduces the image on the screen.
Format
Set Zoom Level [Lock; 25%...400%/Zoom In/Zoom Out]
Options
Lock prohibits users from making changes to the zoom level. To allow users to change the
zoom level, perform the script step without the Lock option.
Zoom In reduces the screen image by one zoom level.
Zoom Out enlarges the screen image by one zoom level.
Reduction values: 100%, 75%, 50%, or 25%.
Enlargement values: 150%, 200%, 300%, or 400%.
Note For FileMaker Go, the maximum enlargement value is 200%.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to specify preset zoom levels. To set a default zoom level, you can use the
OnWindowOpen script trigger.
Example 1
Goes to the Invoices iPhone layout, sets the zoom level to 100%, and locks the zoom level.
Go to Layout ["Invoices iPhone"]
Set Zoom Level [Lock; 100%]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 184
View As
Purpose
Displays data in the specified format.
Format
View As [View as Form/View as List/View as Table/Cycle]
Options
View as Form tells FileMaker Pro to display records page by page in the format determined
by the database designer.
View as List tells FileMaker Pro to display records as records in a list, so they can be
browsed without clicking the backward and forward buttons in the status toolbar.
View as Table tells FileMaker Pro to display the records on screen in a grid, so that many
fields and records may be viewed at one time in a format similar to a spreadsheet.
Cycle switches from the current view to the next view.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can choose View as Form, View as List, View as Table, or you can choose Cycle to
switch from the current format to the next format.
Note FileMaker WebDirect does not support the View as Table option.
Example 1
Imports records, sorts, and switches to Table View.
Import Records [With dialog: On]
Sort Records [Restore; With dialog: Off]
View As [View as Table]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Partial
Runtime solution Yes
Windows script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 185
Example 2
Performs a find, then changes view depending on the number of records in the found set.
Enter Find Mode [Pause: On]
If [Get (FoundCount) = 1]
View As [View as Form]
Else If [Get ( FoundCount ) > 1]
View As [View as List]
End If
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 186
Files script steps
Files script steps operate on entire files. With Files script steps, you can:
create a file
open or close a file
save a copy of a file
convert a file to FileMaker Pro
set multi-user status
allow users to choose formats for the file
recover a file
set print setup options
print
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 187
New File
Purpose
Allows the user to create a new file.
Format
New File
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step opens the New File dialog box. After the new file opens, the script becomes active
again, and if script steps remain, the script continues. The new file remains open and active.
Tip If you want the original file to remain active, add a Select Window script step after the New File
step.
Example 1
Exports records, then creates a new file to import the records into.
Set Error Capture [On]
Export Records [With dialog: On]
New File
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 188
Open File
Purpose
Opens the specified FileMaker file or allows the user to select a file to open.
Format
Open File [Open hidden; “<filename>”]
Options
Open hidden causes FileMaker Pro to open and hide the specified database.
Add FileMaker Data Source specifies a FileMaker Pro database to open.
Add ODBC Data Source specifies an ODBC data source to open.
Manage Data Sources allows you to modify or remove external data sources you have
added. See Editing external FileMaker data sources and Editing ODBC data sources.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
For ODBC data sources, this script step reestablishes a link to the ODBC data source.
Script steps after Open File execute in the FileMaker file that contains the script, not the file opened
by the script.
If you don't specify a file, FileMaker Pro displays the Open File dialog box when the Open File script
step executes so that the user can specify a file. The Open File dialog box will also be displayed if
the file used in the script has been moved, deleted, or renamed.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Partial
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 189
Notes
If new database creation has been disabled in your installation of FileMaker Pro, it will not
be possible to convert file types such as Microsoft Excel or tab delimited files into
FileMaker Pro databases. However, you can still import the data from other file types into
FileMaker Pro (if you open the database with a password that allows you to import). If you
need more information, contact your system administrator.
In runtime solutions, the Open File script step returns an error if an external file is not bound
to the solution.
This script step is unable to open a file from an unauthorized file.
If the specified file is opened then hidden by FileMaker Pro, scripts that are set to run upon
opening are still executed.
Example 1
Exports records from the current database, opens the Invoices Backup database, and runs the
Import Invoices script from the Invoices Backup database.
Export Records [With dialog: On]
Open File ["Invoices Backup"]
Perform Script ["Import Invoices" from file: "Invoices Backup"]
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 190
Close File
Purpose
Closes the specified FileMaker file.
Format
Close File [Current File/”<filename>”]
Options
Current File closes the file that runs the script step.
Add FileMaker Data Source specifies a FileMaker Pro file to disconnect from.
Add ODBC Data Source specifies an ODBC data source to disconnect from.
Manage Data Sources allows you to modify or remove external data sources you have
added. See Editing external FileMaker data sources and Editing ODBC data sources.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
If you do not specify a file, FileMaker Pro stops the currently running script and closes the FileMaker
file that the script is running from.
This script step disconnects the specified ODBC data source. This lets you “re-login” to the specified
ODBC data source with a different user name and password, without closing the FileMaker file.
Notes
If a user moves the specified file, FileMaker Pro might not be able to close the file.
Close File can’t close external data sources that are referenced in the relationships graph.
Example 1
Opens the Invoices database and performs a script, then closes the current database.
Open File ["Invoices"]
Perform Script ["Sort Records" from file: "Invoices"]
Close File [Current File]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 191
Convert File
Purpose
Converts a supported file type into a FileMaker Pro file.
Format
Convert File [Verify SSL Certificates; Open File; With dialog: On/Off;
Skip Indexes; “<filename or source>”]
Options
Verify SSL Certificates verifies the SSL certificate of the server specified in an HTTP
request for XML data. If the certificate cannot be verified, users can choose to connect
anyway or cancel to skip this script step. If the certificate cannot be verified and the Set
Error Capture script step is set to On, this script step behaves as if the server were
unavailable.
Open file after conversion lets you specify whether you want a FileMaker Pro file to open
automatically after conversion.
Specify data source lets you choose the file or source of the data to be converted. If you
don’t specify a file, FileMaker Pro displays the Open File dialog box when the script step
executes. For more information about converting files, refer to the FileMaker Knowledge
Base available at http://help.filemaker.com.
Depending on the file or source you choose, a dialog box may appear for specifying the
following additional options.
When you
choose this file
or source Do this
File In the Specify File dialog box, choose the file you want to import. See Creating file
paths.
XML Data In the Specify XML and XSL Options dialog box, choose the source of the XML data
that you want to import, and choose an XSLT style sheet if you want to apply one
prior to import. The XML and XSLT source may be a file or the result of an HTTP
request, or a field that contains a file path or an HTTP request. For more information,
see Importing XML data.
ODBC Data Specify the data source name and location, the user ID and password (if any), and
the SQL query to be executed. For more information, see Constructing an SQL query
for importing via ODBC.
With dialog specifies whether to display certain dialog boxes when the script step is
performed.
When converting FileMaker files, the dialog boxes used to rename the old file and name
the converted file are not displayed.
When converting other file types, the dialog boxes that are used to specify the way a file
and its data are converted are not displayed.
In these two cases, the default settings for those dialog boxes are used instead.
Skip Indexes lets you specify whether FileMaker Pro should create an index in a converted
FileMaker file.
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 192
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
See Supported import/export file formats for more information.
Note You cannot use this command to convert the contents of a folder. Each file in a folder must be
converted separately.
Example 1
Converts the Invoices database to the current FileMaker format.
Show Custom Dialog ["Convert the Invoices database?"]
If [Get ( LastMessageChoice ) = 1]
Convert File [With dialog: On; “Invoices.fp7”]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 193
Set Multi-User
Purpose
Allows or disallows network access to a file.
Format
Set Multi-User [On/On (Hidden)/Off]
Options
On allows network access via FileMaker Network Sharing. This is the same as selecting All
Users in the FileMaker Network Settings dialog box.
On (Hidden) allows network access but prevents the name of the shared database from
appearing in the Hosts tab in the Launch Center. This is the same as selecting the All
Users and Don't display in Launch Center options in the FileMaker Network Settings
dialog box.
Off disallows network access. This is the same as selecting No Users in the FileMaker
Network Settings dialog box.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
A shared, or multi-user, database is a file that’s available to users on a network. See Sharing and
hosting files for more information.
Example 1
Guarantees that a database is hosted upon launch. Started by the OnFirstWindowOpen script
trigger.
Show Custom Dialog ["Make this file available on the network?"]
If [Get ( LastMessageChoice ) = 1]
Set Multi-User [On]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 194
Example 2
Turns network sharing on if it is off.
If [Get ( MultiUserState ) = 0]
Set Multi-User [On]
End If
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 195
Set Use System Formats
Purpose
Sets the formats either to those stored with the file or to the current system formats.
Format
Set Use System Formats [On/Off]
Options
On instructs FileMaker Pro to use the current system formats.
Off instructs FileMaker Pro to use the formats saved with the file.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Each FileMaker Pro database file stores the date, time, and number formatting of the computer on
which the database was created. These regional settings may be different from the system formats
currently set on your computer.
When you use the current system formats, you don't change the formats saved with the file – you
simply enter and view data in a format that's familiar to you. For example, if a database was created
in Australia, where dates are usually written day-month-year, and you open it in the United States,
where dates are usually written month-day-year, FileMaker Pro alerts you that the system formats
are different.
A startup script that uses the Set Use System Formats script step can be used to control how
FileMaker Pro handles date, time, and number formats for a file that has system formats that are
different from the current system formats.
Example 1
Checks the system language before using system formats. Started by the OnFirstWindowOpen
script trigger.
If [Get ( SystemLanguage ) = “Japanese”]
Set Use System Formats [On]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 196
Save a Copy as
Purpose
Saves a copy of the current file.
Format
Save a Copy as [“<filename>”; Automatically open; Create email; copy/
compacted/clone/self-contained]
Options
Specify output file allows you to specify the name and location of the resulting copy. For
more information, see Creating file paths. If you do not specify a file, FileMaker Pro saves a
copy of the current file and displays the Save As dialog box so the user can specify copying
options. You can choose to Automatically open file or Create email with file as
attachment after saving.
copy saves a complete copy of the current file.
compacted saves a compacted copy of the current file.
clone saves a copy of the file without any records.
self-contained saves a copy of the file with all container content embedded in the file.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use this script step to back up your file.
Notes
This script step is not supported in FileMaker Pro database files hosted by
FileMaker Server.
For files used in FileMaker Go, choose self-contained. Container objects will be embedded
in the copy.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 197
Example 1
Saves a copy or clone of the current database.
Show Custom Dialog ["Save a copy or empty clone of the current file?"]
If [Get ( LastMessageChoice ) = 1]
Save a Copy as [copy]
Else
Save a Copy as [clone]
End If
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 198
Recover File
Purpose
Recovers a damaged FileMaker Pro file.
Format
Recover File [With dialog: On/Off; “<filename>”]
Options
With dialog specifies whether to display a dialog box after the script step is performed,
showing how many bytes of data were recovered, the number of records and field values
skipped, and the number of field definitions recovered.
Setting With dialog to Off applies only to default recovery operations. The Advanced Recovery
Options dialog box is not supported.
Specify output file specifies the file to be recovered. For more information, see Creating
file paths. If you don’t select a source file, the Open Damaged File dialog box displays at
runtime.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The Recover command makes an aggressive attempt to reopen a damaged file. It is intended for
data recovery, not file repair. Do not use the Recover command as part of routine file maintenance.
FileMaker Pro attempts to recover as much of the information in a damaged file as possible, and
then creates a new, recovered file. The original file is not deleted or replaced.
Note Before you begin, be sure you have enough disk space for the recovered file. If there isn't
enough space, the recovered file won't be usable.
Example 1
Opens Invoices Backup, then attempts to recover the database if it is damaged.
Open File ["Invoices Backup"]
If [Get ( LastError ) = 807]
Recover File [With dialog: Off; "Invoices Backup.fmp12"]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 199
Print Setup
Purpose
Sets print options, such as paper size and orientation, which can be stored with this script step.
Format
Print Setup [Restore; With dialog: On/Off]
Options
With dialog specifies whether to display the Print Setup dialog box when the script step is
performed. If you set With dialog to Off, the output from this script step is sent to the last
specified printer and not the printer specified in this script step.
Specify page setup allows you to choose page setup options that are stored with the script
step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can also have this script step performed with a dialog box so the user can specify print options.
You can use multiple Print Setup script steps within a script.
Notes
FileMaker Go does not support the With dialog: On option.
Example 1
Goes to the Print Invoices layout, sorts the records, changes the print settings, and prints.
Go to Layout ["Print Invoices"]
Sort Records [Restore; With dialog: Off]
Print Setup [Restore; With dialog: Off]
Print [With dialog: On]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 200
Print
Purpose
Prints information that is in a file.
Format
Print [Restore: “<printer>”; With dialog: On/Off]
Options
With dialog specifies whether to display the Print dialog box when the script step is
performed.
Specify print options allows you to specify an output destination. When the script
executes, the output from this script step is sent to the printer or fax you specified.
OS X: As an alternative to specifying a printer or fax, you can click PDF in the Print dialog box,
then choose a PDF option from the list or choose Edit menu to define a custom PDF output
format or destination.
If you do not specify an output destination before saving the script or if the specified printer
cannot be found when the script executes, the output from the script step is sent to the user’s
default printer.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Multiple print steps can be added to a script. You can store print options with this script step, or allow
the user to enter printing criteria when the step executes.
If the print job needs special page setup options to print correctly, add a Print Setup script step
before the Print step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Files script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 201
Notes
When you use more than one Print script step in a script, the saved printer name applies to
only the containing Print script step.
A printer name specified in a Print Setup script step is not inherited by any Print script step
in a script.
The settings for double-sided printing and number of copies have no effect in FileMaker Go.
Also, this script step has no option for setting the maximum image DPI, but you can choose
a resolution in the FileMaker Go Print Setup dialog box.
Example 1
Goes to the Print Invoices layout, sorts the records, and prints.
Go to Layout ["Print Invoices"]
Sort Records [Restore; With dialog: Off]
Print [Restore: Printer; With dialog: Off]
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 202
Accounts script steps
Accounts script steps allow you to create and manage user accounts. With Accounts script steps,
you can:
add accounts
delete accounts
reset account passwords
change passwords
enable accounts
log in to a file using a different account and password
Notes
Accounts created using script steps cannot be granted full access privileges (only accounts
created manually).
Users must be assigned the Full Access privilege set to execute account script steps. To
enable users with less than full access privileges to perform account script steps, right-click
the current script in the script pane and choose Grant Full Access Privileges. For more
information on access privileges and script steps, see Editing scripts privileges.
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 203
Add Account
Purpose
Adds a new account name, password, and privilege set.
Format
Add Account [Account Name: <account name>; Password: <password>;
Privilege Set: “<privilege set>”; Expire password]
Options
Account Name is the name for the new account.
Password is the password for the new account.
Privilege Set lets you assign a predefined privilege set for this user or create a new
privilege set.
The Full Access privilege set cannot be assigned via this script step. Accounts with Full Access
privilege sets must be created manually.
User must change password on next login forces users to change their password the
next time they log in to the database.
Compatibility
Originated in
FileMaker Pro 7.0
Description
The account name and password can be literals stored with this script step, or generated at runtime
based on calculations that you set up.
Notes
Account names must be unique.
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the script pane and choose Grant Full Access Privileges.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 204
Example 1
Adds a new user account with data entry only privileges. Requires you to change the password the
next time you log in to the account.
Add Account [Account Name: "User"; Password: "1234"; Privilege Set: "[Data
Entry Only]"; Expire password]
Example 2
Adds a new account with read-only privileges using the name and password in the custom dialog
box.
Show Custom Dialog ["Do you want to add a new account?"; Accounts::Name;
Accounts::Password]
If [Get ( LastMessageChoice ) = 1]
Add Account [Account Name: Accounts::Name; Password:
Accounts::Password; Privilege Set: "[Read-Only Access]"]
End If
Example 3
Adds a new data entry only account unless the current user has read-only privileges. Uses the
current user's name for the new account name.
If [Get ( AccountPrivilegeSetName ) "[Read-Only Access]"]
Add Account [Account Name: Get ( UserName ); Password: "1234";
Privilege Set: "[Data Entry Only]"; Expire password]
Else
Show Custom Dialog ["You do not have enough privileges to add an
account."]
End If
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 205
Delete Account
Purpose
Deletes the specified account.
Format
Delete Account [Account Name: <account name>]
Options
Account Name allows you to specify the name of the existing FileMaker Pro account to be
deleted.
Compatibility
Originated in
FileMaker Pro 7.0
Description
You must specify an existing account.
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the script pane and choose Grant Full Access Privileges.
You cannot use this script step to delete an account that has full access privileges.
This script step deletes an account without displaying a dialog box.
Example 1
Deletes the Sales account.
Delete Account [Account Name: "Sales"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 206
Example 2
Deletes the current account if it has full access privileges.
If [Get ( AccountPrivilegeSetName ) = "[Full Access]"]
Delete Account [Account Name: Get ( AccountName )]
Re-Login [With dialog: On]
Else
Show Custom Dialog ["You do not have enough privileges to delete an
account."]
End If
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 207
Reset Account Password
Purpose
Resets the password of the existing FileMaker Pro account you specify.
Format
Reset Account Password [Account Name: <account name>;
New Password: <password>; Expire password]
Options
Account Name allows you to specify the name of the existing FileMaker Pro account with
the password to be reset.
New Password is the new password for this account.
User must change password on next login forces users to change their password the
next time they log in to the database.
Compatibility
Originated in
FileMaker Pro 7.0
Description
Use multiple occurrences of this script step to reset multiple accounts in a single script.
Notes
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the script pane and choose Grant Full Access Privileges.
This script step resets the account password without displaying a dialog box.
Example 1
Changes the password of the Sales account. Requires you to change the password the next time
you log in to the account.
Reset Account Password [Account Name: "Sales"; New Password: "1234";
Expire password]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 208
Example 2
Asks if you want to change the current account's password. Resets the password with the contents
of the Password field.
Show Custom Dialog ["Reset the current account password?";
Accounts::Password]
If [Get ( LastMessageChoice ) = 1]
Reset Account Password [Account Name: Get ( AccountName ); New
Password: Accounts::Password]
End If
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 209
Change Password
Purpose
Changes the password for the current account.
Format
Change Password [Old Password: <old password>;
New Password: <new password>; With dialog: On/Off]
Options
Old Password is the old password for the current account.
New Password is the new password for the current account.
With dialog specifies whether to display the Change Password dialog box when the script
step is performed. If With dialog is Off, FileMaker Pro uses the literal password information
stored with the script step, or generates a new password based on a calculation.
Compatibility
Originated in
FileMaker Pro 7.0
Description
This script step displays the Change Password dialog box, unless the With dialog option is set to
Off. Change Password allows you to change your password but not your access privileges.
Notes
Users must have password change privileges to use this script step to change their
passwords. To enable users who do not have password change privileges to run this script
step, right-click the current script in the scripts pane and choose Grant Full Access
Privileges.
Unless the Set Error Capture script step has enabled error capture, users get five attempts
to change their password.
If Set Error Capture is on, users get a single attempt to enter their old and new password.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Yes
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 210
Example 1
Opens the Change Password dialog box every ten times the database is opened to encourage the
user to change his or her password frequently. Started by the OnFirstWindowOpen script trigger.
Set Field [Accounts::Open Count; Accounts::Open Count + 1]
If [Accounts::Open Count = 10]
Set Field [Accounts::Open Count; 0]
Change Password [With dialog: On]
End If
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 211
Enable Account
Purpose
Enables or disables a specified account.
Format
Enable Account [Account Name: <account name>; Activate/Deactivate]
Options
Account Name allows you to specify the name of the account to be activated or
deactivated.
Activate account enables the specified account.
Deactivate account disables the specified account.
Compatibility
Originated in
FileMaker Pro 7.0
Description
You must specify an existing account.
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the scripts pane and choose Grant Full Access Privileges.
You cannot use this script step to deactivate an account with full access privileges.
Example 1
Displays the contents of the Name field and prompts the user to activate an account with that name.
Show Custom Dialog ["Activate the " & Accounts::Name & " account?"]
If [Get ( LastMessageChoice ) = 1]
Enable Account [Account Name: Accounts::Name; Activate]
End if
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 212
Example 2
Deactivates the current account and prompts the user to log in to a different account.
Show Custom Dialog ["Deactivate the " & Get ( AccountName ) & " account?"]
If [Get ( LastMessageChoice ) = 1]
Enable Account [Account Name: Get ( AccountName ); Deactivate]
Re-Login [With dialog: On]
End if
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 213
Re-Login
Purpose
Allows logging in to the file using a different account and password without having to close and
reopen the file.
Format
Re-Login [Account Name: <account name>; Password: <password>; With dialog:
On/Off]
Options
With dialog controls whether the Open <filename> dialog box displays when the script step
is performed. This dialog box requires the user to manually enter an account and password
(or edit information already displayed in the dialog box) to open a file. When With dialog is
set to On, FileMaker Pro uses the account and password information that is stored with the
script step, or generates information from calculations when the script step is performed.
Account Name allows you to specify the name of the account to be authenticated.
Password allows you to specify the password for this account.
Compatibility
Originated in
FileMaker Pro 7.0
Description
Privileges assigned to the new account take effect immediately, including access to tables, records,
layouts, scripts, and value lists.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Yes
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Accounts script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 214
Notes
You do not need full access privileges to perform this script step. Users with any level of
access can use this script step to re-login to the database.
Users get five attempts to enter their account and password, unless the Set Error Capture
script step is enabled.
If the Set Error Capture script step is enabled, users get a single attempt to enter their
account and password.
The With dialog option works differently depending on where the script runs:
Server-side scripts and Custom Web Publishing run this script step as if this option is
set to Off.
In FileMaker WebDirect, setting this option to On displays the dialog box. However, if
you store the account and password in the script step, this information is not displayed
in the dialog box.
Example 1
Prompts the current user to re-login after deleting the specified account.
Note Because of the Delete Account step, users must have full access privileges to run this script.
Delete Account [Account Name: "User"]
Re-Login [With dialog: On]
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 215
Spelling script steps
With spelling script steps you can:
check the spelling in a selection of text
check the spelling of a record
check the spelling of an entire found set
correct a word
set spelling options for a file
select a dictionary
edit the user dictionary
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 216
Check Selection
Purpose
Uses the spelling checker to check the selected text.
Format
Check Selection [Select; <table::field>]
Options
Select entire contents checks all the text in the active field. If you do not use Select entire
contents, you must select some text before this script step executes.
Go to target field allows you to specify a field to be checked.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Displays the Spelling dialog box unless the field is empty.
Example 1
Checks spelling in the Notes field in the current record.
Check Selection [Select; Products::Notes]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 217
Check Record
Purpose
Uses the spelling checker to check the contents of every field in the current record.
Format
Check Record
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Checks spelling in all fields in the current record. Started by the OnRecordCommit script trigger.
Check Record
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 218
Check Found Set
Purpose
Uses the spelling checker to check the contents of every field in the records being browsed.
Format
Check Found Set
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Checks spelling in all fields in all records in the found set.
Perform Find [Restore]
Check Found Set
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 219
Correct Word
Purpose
Opens the Spelling dialog box so the user can correct a word FileMaker Pro has identified as
misspelled.
Format
Correct Word
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing Edit menu > Spelling > Correct Word.
Use this script step to open the Spelling dialog box for users if you have restricted their access to
FileMaker Pro menus.
Notes
Check spelling as you type must be selected (File menu > File Options > Spelling tab.)
This script step can only correct a word after FileMaker Pro identifies it as being misspelled.
Example 1
Displays a custom dialog box that asks if the user wants to open the Spelling dialog box.
Show Custom Dialog ["Open the Spelling dialog box to correct spelling?"]
If [Get ( LastMessageChoice ) = 1]
Correct Word
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 220
Spelling Options
Purpose
Opens the File Options dialog box to the Spelling tab.
Format
Spelling Options
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing File menu > File Options > Spelling tab.
Use this script step to open the File Options dialog box for users if you have restricted their access
to FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to turn on the Beep on questionable
spellings option.
Show Custom Dialog ["Would you like to check spelling as you type?"]
If [Get ( LastMessageChoice ) = 1]
Spelling Options
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 221
Select Dictionaries
Purpose
Opens the Select Dictionaries dialog box.
Format
Select Dictionaries
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing Edit menu > Spelling > Select Dictionaries.
Use this script step to open the Select Dictionaries dialog box for users if you have restricted their
access to FileMaker Pro menus.
Example 1
Opens the Select Dictionaries dialog box and checks spelling in all fields in the current record.
Select Dictionaries
Check Record
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Spelling script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 222
Edit User Dictionary
Purpose
Opens the User Dictionary dialog box.
Format
Edit User Dictionary
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing Edit menu > Spelling > Edit User Dictionary.
Use this script step to open the Edit User Dictionary dialog box for users if you have restricted their
access to FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to open the Edit User Dictionary dialog box.
Show Custom Dialog ["Would you like to edit the dictionary used for spell
checking?"]
If [Get ( LastMessageChoice ) = 1]
Edit User Dictionary
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 223
Open Menu Item script steps
Open Menu Item script steps open specific FileMaker Pro dialog boxes as if you had chosen the
command from a menu. You could use one of these script steps to open a dialog box for users if you
have restricted their access to FileMaker Pro menus with access privileges. With these script steps
you can:
open the Edit Saved Finds dialog box
open the Preferences dialog box
open the File Options dialog box
open the Manage Database dialog box
open the Manage External Data Sources dialog box
open the Manage Layouts dialog box
open the Script Workspace
open the Manage Themes dialog box
open the Manage Value Lists dialog box
open the Find/Replace dialog box
open Help
open the Open Remote File dialog box
open the FileMaker Network Settings dialog box
open the Upload to FileMaker Server dialog box
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 224
Open Edit Saved Finds
Purpose
Opens the Edit Saved Finds dialog box.
Format
Open Edit Saved Finds
Options
None.
Compatibility
Originated in
FileMaker Pro 10.0
Description
Use this script step to open the Edit Saved Finds dialog box for users if you have restricted their
access to FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to open the Edit Saved Finds dialog box.
Show Custom Dialog ["Do you want to change a saved find?"]
If [Get ( LastMessageChoice ) = 1]
Open Edit Saved Finds
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 225
Open Preferences
Purpose
Opens the Preferences dialog box to the General tab.
Format
Open Preferences
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing Edit menu > Preferences (Windows) or FileMaker Pro
menu > Preferences (OS X).
Use this script step to open the Preferences dialog box for users if you have restricted their access
to FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to open the Preferences dialog box.
Show Custom Dialog ["Do you want to open the Preferences dialog box?"]
If [Get ( LastMessageChoice ) = 1]
Open Preferences
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 226
Open File Options
Purpose
Opens the File Options dialog box to the Open tab.
Format
Open File Options
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing File menu > File Options.
Use this script step to open the File Options dialog box for users if you have restricted their access
to FileMaker Pro menus.
Note Only the Spelling tab of the File Options menu is available in runtime solutions.
Example 1
Displays a custom dialog box that asks if the user wants to open the File Options dialog box.
Show Custom Dialog ["Do you want to open the File Options dialog box?"]
If [Get ( LastMessageChoice ) = 1]
Open File Options
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Partial
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 227
Open Manage Containers
Purpose
Opens the Manage Containers dialog box.
Format
Open Manage Containers
Options
None.
Compatibility
Originated in
FileMaker Pro 12.0
Description
This script step opens the Manage Containers dialog box, where the user can manage thumbnail
settings and external locations for container content. This script step is the same as choosing File
menu > Manage > Containers.
Notes
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the scripts pane and choose Grant Full Access Privileges.
See Sharing files on a network for information about making schema changes to shared
databases.
Example 1
Displays a custom dialog box that asks if the user wants to edit settings for thumbnails, and opens
the Manage Containers dialog box.
Show Custom Dialog ["Do you want to change settings for thumbnail images
in container fields?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Containers
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 228
Open Manage Database
Purpose
Opens the Manage Database dialog box.
Format
Open Manage Database
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step opens the Manage Database dialog box, where the user can create or edit tables,
fields, and relationships. This script step is the same as choosing File menu > Manage > Database.
Notes
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the scripts pane and choose Grant Full Access Privileges.
See Sharing files on a network for information about making schema changes to shared
databases.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database's tables and fields,
and opens the Manage Database dialog box.
Show Custom Dialog ["Do you want to manage database tables and fields?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Database
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 229
Open Manage Data Sources
Purpose
Opens the Manage External Data Sources dialog box.
Format
Open Manage Data Sources
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step opens the Manage External Data Sources dialog box, where the user can create,
edit, or delete external FileMaker or ODBC data sources. This script step is the same as choosing
File menu > Manage > External Data Sources.
Notes
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the scripts pane and choose Grant Full Access Privileges.
See Sharing files on a network for information about making schema changes to shared
databases.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database's data sources,
and opens the Manage External Data Sources dialog box.
Show Custom Dialog ["Do you want to manage the database's external data
sources?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Data Sources
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 230
Open Manage Layouts
Purpose
Opens the Manage Layouts dialog box.
Format
Open Manage Layouts
Options
None.
Compatibility
Originated in
FileMaker Pro 11.0
Description
This script step is the same as choosing File menu > Manage > Layouts, or choosing Manage
Layouts from the Layout pop-up menu.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database's layouts, and
opens the Manage Layouts dialog box.
Show Custom Dialog ["Do you want to manage database layouts?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Layouts
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 231
Open Script Workspace
Purpose
Opens the Script Workspace window.
Format
Open Script Workspace
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing Scripts menu > Script Workspace, or File menu >
Manage > Scripts.
Note Once an Open Script Workspace step is performed, FileMaker Pro halts execution of the
current script. This prevents unexpected conditions from occurring if the currently running script is
edited.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database's scripts, and
opens the Script Workspace.
Show Custom Dialog ["Do you want to manage database scripts?"]
If [Get ( LastMessageChoice ) = 1]
Open Script Workspace
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 232
Open Manage Themes
Purpose
Opens the Manage Themes dialog box.
Format
Open Manage Themes
Options
None.
Compatibility
Originated in
FileMaker Pro 13.0
Description
This script step is the same as choosing File menu > Manage > Themes.
Use this script step to open the Manage Themes dialog box for users if you have restricted their
access to FileMaker Pro menus.
Notes
Users must have full layout access privileges to open the Manage Themes dialog box. For
more information, see Editing record access privileges and Editing layouts privileges.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database’s layout themes,
and opens the Manage Themes dialog box.
Show Custom Dialog ["Do you want to manage database themes?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Themes
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 233
Open Manage Value Lists
Purpose
Opens the Manage Value Lists dialog box.
Format
Open Manage Value Lists
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing File menu > Manage > Value Lists.
Use this script step to open the Manage Value Lists dialog box for users if you have restricted their
access to FileMaker Pro menus.
Notes
You must be assigned the Full Access privilege set to perform this script step. To enable
users with less than full access privileges to perform this script step, right-click the current
script in the scripts pane and choose Grant Full Access Privileges.
See Sharing files on a network for information about making schema changes to shared
databases.
Example 1
Displays a custom dialog box that asks if the user wants to manage the database's value lists, and
opens the Manage Value Lists dialog box.
Show Custom Dialog ["Do you want to manage database value lists?"]
If [Get ( LastMessageChoice ) = 1]
Open Manage Value Lists
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 234
Open Find/Replace
Purpose
Opens the Find/Replace dialog box.
Format
Open Find/Replace
Options
None.
Compatibility
Originated in
FileMaker Pro 7.0
Description
This script step is the same as choosing Edit menu > Find/Replace > Find/Replace.
Use this script step to open the dialog box for users if you have restricted their access to
FileMaker Pro menus.
Note If you want to perform a find/replace without opening a dialog box, use the Perform Find/
Replace script step and set the With dialog option to Off.
Example 1
Displays a custom dialog box that asks if the user wants to open the Find/Replace dialog box.
Show Custom Dialog ["Open the Find/Replace dialog box?"]
If [Get ( LastMessageChoice ) = 1]
Open Find/Replace
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 235
Open Help
Purpose
Opens the onscreen Help.
Format
Open Help
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as displaying Help in the FileMaker product.
Example 1
Displays a custom dialog box that asks if the user wants to see the onscreen Help.
Show Custom Dialog ["Do you want to open onscreen Help?"]
If [Get ( LastMessageChoice ) = 1]
Open Help
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 236
Open Remote
Purpose
Opens the Open Remote File dialog box.
Format
Open Remote
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The Open Remote File dialog box allows you to select and open a shared FileMaker Pro file over a
network connection. See Open Remote File dialog box.
Use this script step to open the dialog box for users if you have restricted their access to
FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to open a shared database, and opens the
Open Remote File dialog box.
Show Custom Dialog ["Do you want to open a shared database?"]
If [Get ( LastMessageChoice ) = 1]
Open Remote
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 237
Open Sharing
Purpose
Opens the FileMaker Network Settings dialog box.
Format
Open Sharing
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step is the same as choosing File menu > Sharing > Share with FileMaker Clients.
Use this script step to open the FileMaker Network Settings dialog box for users if you have
restricted their access to FileMaker Pro menus.
Note Users must be assigned a privilege set that permits changes to sharing settings to use this
script step. To enable users who cannot shange sharing settings to run this script step, right-click the
current script in the scripts pane and choose Grant Full Access Privileges.
Example 1
Displays a custom dialog box that asks if the user wants to share the current database, and opens
the FileMaker Network Settings dialog box.
Show Custom Dialog ["Do you want to share this database?"]
If [Get ( LastMessageChoice ) = 1]
Open Sharing
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Open Menu Item script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 238
Upload To FileMaker Server
Purpose
Opens the Upload to FileMaker Server dialog box.
Format
Upload to FileMaker Server
Options
None
Compatibility
Originated in
FileMaker Pro 13.0
Description
This script step is the same as choosing File menu > Sharing > Upload to FileMaker Server.
Use this script step to open the Upload to FileMaker Server dialog box for users if you have
restricted their access to FileMaker Pro menus.
Example 1
Displays a custom dialog box that asks if the user wants to upload a database to FileMaker Server,
and opens the Upload to FileMaker Server dialog box.
Show Custom Dialog ["Do you want to upload a database to
FileMaker Server?"]
If [Get ( LastMessageChoice ) = 1]
Upload to FileMaker Server
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 239
Miscellaneous script steps
Miscellaneous script steps allow you to script miscellaneous actions, like:
displaying a dialog box that presents the user with different options
showing or hiding the toolbars
playing the system alert sound
Installing a plug-in file in a container field
launching a web browser and displaying a specified URL
sending Internet email
sending a DDE command (Windows) or an event to another application
exiting the application
refreshing an object or window
Tip Use the Comment script step to annotate your scripts so your colleagues can understand them.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 240
Show Custom Dialog
Purpose
Displays a custom message dialog box, with custom text and labels.
Format
Show Custom Dialog [<title>; <message text>; Table1::input field 1;...]
Options
The “Show Custom Dialog” Options dialog box allows you to set the dialog box title, message text,
and buttons, and specify up to three fields to use for input or display.
General options
Title specifies the title of the custom dialog box. You can enter literal text or click
Specify to create the dialog box title from a calculation.
Message specifies the message of the dialog box.You can enter literal text or click
Specify to create the message text from a calculation.
Button Labels specifies how many buttons (up to three) to display in the custom dialog
box and labels for these buttons. If you leave a button label blank, the button does not
appear in the custom dialog box. If you leave all button titles blank, an OK button
displays in the lower-right corner of the custom dialog box. To create a button label
based on a calculation, click Specify and then specify the calculation.
Commit Data checkboxes pass input from the dialog box to the database according to
the action of each button. If no fields are active, then the data is committed; if a field is
active, then the data is committed when the record is committed.
Input Field options
Show input field <n> activates an input field.
Specify selects the field for input. Each input area maps to one field.
Use password character (*) masks text as it is entered, or as it is displayed from the
database. This option obscures data being input into the custom dialog box or being
displayed, but does not alter the actual data as it is stored in the database.
Label specifies a field label (the text that will identify this input to the user.) You can
enter literal text or create the label from a calculation.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 241
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The custom message dialog box can take user input for up to three fields in the database, and
display data from up to three fields in the database. The script pauses as long as the custom dialog
box stays on the screen. Fields used for input can be of type text, number, date, time, timestamp, or
container. Your custom dialog box can also have up to three buttons, with custom button titles.
Use the Get(LastMessageChoice) function to determine which button the user presses.
1 for the first button (by default, labeled OK)
2 for the second button (by default, labeled Cancel)
3 for the third button
Notes
If values entered into input fields don’t match the field type, a validation error message
displays. The user must resolve validation errors before the dialog box can be closed. See
Defining field validation for more information.
The fields you specify don’t need to appear on the current layout. Show Custom Dialog
input fields are independent of layouts, similar to the Set Field script step.
Data can't be inserted into calculation or summary fields.
Show Custom Dialog ignores any field entry options. See Allowing or preventing entry into
fields for more information.
Data entry via the Show Custom Dialog script step is limited by any access privileges
criteria that may be in place. (To enable the script for all users, right-click the current script in
the scripts pane and choose Grant Full Access Privileges.)
(Windows) You can create a keyboard shortcut for a custom dialog box button by placing an
ampersand before the shortcut key letter in the button label. For example, to create a
keyboard shortcut ‘D’ (Alt+D) for a button labeled ‘Done’, type the label ‘&Done’.
For databases created with pre-12 versions of FileMaker Pro that are opened with
FileMaker Pro 15, the Commit Data checkbox for Default Button is selected when you
open the Show Custom Dialog dialog box.
Before you change the data commitment status of a button for a database that’s already in
use, consider the behavior that users currently expect of the button and how changing its
behavior could affect the validity of data committed (or not committed) to the database.
To develop more-complex custom dialog boxes, you can use the New Window script step.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 242
Example 1
Performs a find. If no records were found, displays a custom dialog box.
Perform Find [Restore]
If [Get (FoundCount) = 0]
Show Custom Dialog ["No records were found."]
End If
Example 2
Creates a new record, prompts the user to enter information, then goes to the Customer Details
layout. The first button is Cancel so that users don't inadvertently create a record by pressing Return
or Enter in the custom dialog box.
Freeze Window
New Record/Request
Show Custom Dialog ["New Customer"; "Enter information into the fields
below:"; Customers::Company; Customers::Name; Customers::City]
If [Get ( LastMessageChoice ) = 1]
Delete Record/Request [With dialog: Off]
Else
Go to Layout ["Customer Details"]
End If
Example 3
Enters Find mode, prompts the user for find criteria, and performs the find. If the find returns no
records, asks if the user wants to find again, and either performs the script again or halts all scripts.
Script: Find
Enter Find Mode [Pause: Off]
Show Custom Dialog ["Find customers by ID, name, or city.";
Customers::ID; Customers::Name; Customers::City]
If [Get ( LastMessageChoice ) = 1]
Perform Find [ ]
If [Get ( FoundCount ) = 0]
Show Custom Dialog ["No records were found. Find again?"]
If [Get ( LastMessageChoice ) = 1]
#Calls this script as a sub-script
Perform Script ["Find"]
Else
Show All Records
#Halts all scripts and sub-scripts
Halt Script
End If
End If
Else If [Get ( LastMessageChoice ) = 2]
Enter Browse Mode [Pause: Off]
End If
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 243
Allow Formatting Bar
Purpose
Enables or disables display of the formatting bar.
Format
Allow Formatting Bar[<On/Off>]
Options
On indicates that the formatting bar, the View menu > Formatting Bar menu item, and the
Formatting Bar button in the layout bar are enabled.
Off hides the formatting bar, disables the View menu > Formatting Bar menu item, and
disables the Formatting Bar button in the layout bar.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step works in all modes except Layout mode.
Use this script step to disable the formatting bar and menu items related to the formatting bar. This
script step only affects the active window of the file from which the script step is called.
In runtime solutions created with the FileMaker Pro Advanced software, the formatting bar is hidden
in Kiosk mode. Allow Formatting Bar has no effect in Kiosk mode.
Example 1
Goes to the Comment field on the Invoice Details layout and shows the formatting bar.
Go to Layout ["Invoice Details"]
Go to Field [Invoices::Comments]
Allow Formatting Bar [On]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Partial
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 244
Refresh Object
Purpose
Updates the contents, conditional formatting, and visibility state of the specified object.
Format
Refresh Object [Object Name: <object name>; Repetition: <value or
formula>]
Options
Object name is a named object on the current layout.
Repetition (optional) lets you choose which field repetition to refresh. Defaults to 1. This
option is ignored if the object is not a field.
Compatibility
Originated in
FileMaker Pro 13.0
Description
Refresh Object does not support repetition numbers when updating the visibility state of an object
with a hidden condition.
If the specified object is in a portal, Refresh Object updates the object in every visible portal row.
If the repetition calculation returns zero, or the expression does not exist, all repetitions are
refreshed.
Note To update all objects in the current window, use the Refresh Window script step.
Example 1
Allows the user to log in to a different account and updates the visibility state of the Confidential
object. The Confidential object hides when the user is not logged in to the Admin account.
Re-Login [With dialog: On]
Refresh Object ["Confidential"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 245
Beep
Purpose
Plays a system beep sound.
Format
Beep
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Example 1
Performs a find. If no records were found, beeps.
Set Error Capture [On]
Perform Find [Restore]
If [Get ( FoundCount ) = 0]
Beep
Show Custom Dialog ["No records were found."]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 246
Speak (OS X)
Purpose
Produces speech from text.
Format
Speak [<text to be spoken>]
Options
Type the text to be spoken directly in the text entry area, or click Specify to create your
spoken text from a calculation.
Use Voice specifies a voice from the various voices available on your computer.
Wait for speech completion before continuing tells FileMaker Pro to wait until the
speech is completed before continuing with the next script step.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can enter a literal text string or use a calculation to create the text to be spoken. You can also
specify which voice synthesizer to use and whether or not to wait for the speech to be completed,
before continuing with the next script step.
If the database is opened on a non-speaking computer, the script can still be edited, but only the
default voice synthesizer is available. Speak script steps are not executed when the script is run on
a non-speaking computer.
Example 1
Tells the user to enter a company name if the Company field is empty. Can be started by the
OnRecordCommit, OnLayoutExit, or OnWindowClose script triggers.
If [IsEmpty ( Contacts::Company )]
Speak ["Enter a company name"]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 247
Example 2
Speaks the contents of the Summary field in the current record.
Go to Layout ["Invoice Details"]
Speak [Invoices::Summary]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 248
Dial Phone
Purpose
Dials a phone from within a script.
Format
Dial Phone [With dialog: On/Off; <phone number>]
Options
With dialog specifies whether to display the Dial Phone dialog box when the script step is
performed.
Phone Number lets you enter a phone number to dial.
Specify lets you create a calculation to generate the phone number.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can enter a phone number or specify a calculation to create a phone number. You can specify
number, text, calculation, or global fields. Letters within the phone number are translated to numbers
(except for q and z). You can also choose whether to use the current phone preferences based on
your current location.
Tip To place an international call in FileMaker Go, filter the phone number for numerical digits and
the "+" symbol.
Important The Dial Phone script step is not supported in OS X, but you can create scripts that
include the Dial Phone script step to use in FileMaker Go.
Example 1
Dials the phone number contained in the script.
Dial Phone [With dialog: On; "5550987654"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 249
Example 2
Dials the phone number contained in the Work Phone field in the current record.
Go to Layout ["Customer Details"]
If [not IsEmpty ( Customers::Work Phone )]
Dial Phone [With dialog: Off; Customers::Work Phone]
End If
Example 3
Filters the contents of the Work Phone field for appropriate characters and dials the filtered number.
Go to Layout ["Customer Details"]
If [not IsEmpty ( Customers::Work Phone )]
Dial Phone [With dialog: Off; Filter ( Customers::Work Phone ;
"1234567890+" )]
End If
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 250
Install Plug-In File
Purpose
Installs or updates a plug-in file from a container field onto your computer.
Format
Install Plug-In File[<table::field>]
Options
<table::field> allows you to specify the container field with the plug-in that you want to install or
update. If no field is specified, FileMaker Pro installs the plug-in in the current container field in the
active table.
Compatibility
Originated in
FileMaker Pro 12.0
Description
You must insert the plug-in in a container field before you can install or update the plug-in. For more
information, see Insert File or Installing plug-ins.
FileMaker Pro installs plug-ins in the following locations:
Operating
system Product Plug-ins are installed in this folder
Windows FileMaker Pro C:\users\user_name\AppData\Local\FileMaker\FileMaker Pro\
15.0\Extensions\
FileMaker Pro
Advanced
C:\users\user_name\AppData\Local\FileMaker\FileMaker Pro
Advanced\15.0\Extensions\
OS X FileMaker Pro Macintosh HD/Users/user_name/Library/Application Support/
FileMaker/FileMaker Pro/15.0/Extensions
FileMaker Pro
Advanced
Macintosh HD/Users/user_name/Library/Application Support/
FileMaker/FileMaker Pro Advanced/15.0/Extensions
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go No
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 251
Only FileMaker plug-in files can be installed. If a non-plug-in file is located in the target or active
container field, no action takes place when the script runs. In Windows, plug-ins have the extension
.fmx (32-bit FileMaker Pro) or .fmx64 (64-bit FileMaker Pro). In OS X, the plug-ins have the
extension .fmplugin.
Compressed plug-in files in .zip format or plug-in files in .tar format can’t be installed.
You can use the Get(InstalledFMPlugins) function to identify the name, version, and enabled state of
an installed plug-in. This function can help you determine whether the installed plug-in is newer or
older than the plug-in required by the solution file. See Get(InstalledFMPlugins).
Plug-ins must be enabled in the plug-in preferences for FileMaker Pro to recognize them. If the
Install Plug-In File script step installs a plug-in update but the plug-in is disabled in the plug-in
preferences, FileMaker Pro installs the update but does not enable the plug-in. See Setting plug-in
preferences.
For FileMaker Server-hosted files, the server administrator needs to allow the Install Plug-In File
script step to update FileMaker Server plug-ins in the Server Admin Console. See FileMaker Server
Help.
Notes
FileMaker Pro can only install plug-ins that match the FileMaker Pro application’s
architecture. For example, the 64-bit version of FileMaker Pro can only install 64-bit plug-
ins. Use the Get(ApplicationArchitecture) function to determine the current application's
architecture.
The system administrator can use the personalization file during a volume license
installation to disable plug-ins and prevent plug-in updates from installing in FileMaker Pro.
See FileMaker Pro Network Install Setup Guide.
Example 1
Installs the Video plug-in.
Show Custom Dialog ["Do you want to install the latest version of the
Video Plug-In?"]
If [Get ( LastMessageChoice ) = 1]
Install Plug-In File[Plugins::Video]
End If
Example 2
Detects the application architecture, then installs the appropriate version of a plug-in.
If [ Get ( ApplicationArchitecture ) = "i386"]
Install Plug-In File [Plugins::32bit]
Else If ( Get ( ApplicationArchitecture ) = "x86_64"]
Install Plug-In File [Plugins::64bit]
End If
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 252
Install Menu Set
Purpose
Changes the menu set based on conditions established in the script.
Format
Install Menu Set [<menu set name>; Use as file default]
Options
<menu set name> specifies the menu set to install.
Use As File Default overrides the file’s default menu set specified in the Manage Custom
Menus dialog box with the menu set specified in this script step. Once you close the file, the
default menu set reverts to the one specified in the Manage Custom Menus dialog box.
Select the menu set that you want the script step to install from the list.
Compatibility
Originated in
FileMaker Pro 8.0
Example 1
Goes to the Invoice Details layout and installs the Invoices Menu Set if the Print Invoices Menu Set
was installed.
Go to Layout ["Invoice Details"]
If [Get ( CustomMenuSetName ) = "Print Invoices Menu Set"]
Install Menu Set [“Invoices Menu Set”]
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 253
Set Web Viewer
Purpose
Controls the specified web viewer.
Format
Set Web Viewer [Object Name: “<object name>”; Action: <action>]
Options
Object Name is the name of the web viewer to act upon. To assign an object name, select
the web viewer, choose View menu > Inspector in Layout mode. Click the Position
tab, then in the Position area, enter a name for the object.
Action lets you choose one of the following:
Reset resets the named web viewer to its originally specified web address. This action
also clears this web viewer’s Back and Forward history.
Reload reloads the web page that the web viewer is displaying.
Go Forward goes forward one page, the same way a web browser does.
Go Back goes back one page, the same way a web browser does.
Go to URL lets you specify a new web address to load in the web viewer. The new web
address is a calculation that you specify in the “Set Web Viewer - Go to URL” Options
dialog box. In this script step, you cannot change whether the web viewer allows
interaction, shows a progress bar or status messages, displays content in Find mode, or
automatically encodes a URL. You can set these options only when you add or change
a web viewer in Layout mode.
Compatibility
Originated in
FileMaker Pro 8.5
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 254
Description
This script step works only for named web viewer objects.
To specify the object name, either type the name in the Object Name box or click Specify and
create a calculation.
If you choose the action Go to URL:
You specify a web address in much the same way you do when you create a web
viewer on a layout. For more information, see Working with web viewers on layouts.
You can send html data to a web viewer by including the data in a URL, using the
following format:
data:[<mediatype>][;base64],<data>
Where the following syntax applies:
dataurl = "data:" [ mediatype ] [ ";base64" ] "," data
mediatype = [ type "/" subtype ] *( ";" parameter )
data = *urlchar
parameter = attribute "=" value
More information about the “data URL scheme” can be found on the web.
FileMaker Pro supports only UTF-16 character encoding. Character data encoded using
other methods will not display the target of the URL.
FileMaker WebDirect does not support the GoForward and GoBack options.
Example 1
Resets the web viewer named Product Website to its originally specified web address.
Set Web Viewer [Object Name: "Product Website"; Action: Reset]
Example 2
Displays the FileMaker, Inc. homepage in the Product Website web viewer:
Set Web Viewer [Object Name: "Product Website"; URL: "http://
www.filemaker.com"]
Example 3
Displays the URL entered in the Website field in the Product Website web viewer:
Set Web Viewer [Object Name: "Product Website"; URL: Products::Website]
Example 4
Uses the data URL scheme to display a small icon in a web viewer named WV2.
Set Web Viewer [Object Name: "WV2"; URL: "data:image/
gif;base64,R0lGODlhFwAMAKEAAL+/v///
AAAAUwAAACH5BAEAAAAALAAAAAAXAAwAAAI7hBGHapHcXJKPumizpigI+QliSH0XIjokWJ6oB
4+qt0Zmaqpjesxz7st1YD8ZEbhJajAuDgfSYTx60wIAOw=="]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 255
Open URL
Purpose
Allows the user to open a URL.
Format
Open URL [With dialog: On/Off; <URL>]
Options
With dialog specifies whether to display the “Open URL” Options dialog box when the
script step is performed.
URL allows you to type the URL or to create your URL from a calculation.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Open URL supports http, https, ldap, ldaps, ftp, file, and mailto URL types, using the application
registered with the operating system for each URL type. For example, if the URL starts with http,
FileMaker Pro opens the user's web browser and processes the URL.
If the specified URL contains spaces or other special characters, replace the characters with the
corresponding encoded values required for valid URLs. For example, replace "@" with "%40".
Note FileMaker WebDirect does not support the file:// protocol.
Example 1
Opens the user's web browser and displays the FileMaker, Inc. homepage.
Open URL [With dialog: Off; "http://www.filemaker.com/"]
Example 2
Opens Windows Notepad and opens the file My_File.txt on the root level of the user's hard disk.
Open URL [With dialog: Off; "file://c:/My_File.txt"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 256
Example 3
Launches the default email application, opens a new email message, and uses the value in the
Email field to address the message.
Open URL [With dialog: Off; "mailto:" & Customers::Email]
Example 4
Opens a shared FileMaker Pro file running on another system.
Open URL [With dialog: Off; "fmp://account:password@host/database"]
#where "account" is the FileMaker Pro account name, "password" is the
account password, "host" is a DNS entry, IPv4 address, or IPv6 address for
the machine where the file resides, and "database" is the FileMaker Pro
filename.
Important Account name and password information entered in an Open URL script step is visible
to users with script editing access privileges, and is therefore not secure.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 257
Send Mail
Purpose
Sends an email message through an email application or via SMTP.
Format
Send Mail [Send via E-mail Client/Send via SMTP Server; With dialog: On/
Off; To: “<to>”; CC: “<CC>”; BCC: “<BCC>”;
Subject: “<subject>”; Message: “<message>”; “<attachment>”]
Options
With dialog specifies how FileMaker Pro will handle the composed email message. If you
set With dialog to On, the composed message is left open for review in the email
application. (In some applications, the new message is left in the Drafts folder.) If With
dialog is Off, FileMaker Pro puts the composed email message in the email application's
outbox, ready to be sent.
Specify displays the Send Mail dialog box, where you can set options for your mail. Choose
the method by which to send mail, E-Mail Client or SMTP Server. (If you choose SMTP
Server, the SMTP Options dialog box appears. For information about setting SMTP options,
see Entering or editing SMTP options.) Then choose to create One email using data from
the current file, or create Multiple emails (one for each record in found set).
Note If you choose SMTP Server and Multiple emails (one for each record in the found
set) and FileMaker encounters an error while emailing one of the records, the remaining records
will not be sent.
For each of the following options, you can enter text directly, or enter values from the default email
client (Windows), field, or calculation.
Windows: Select Specify Email Addresses to enter one or more email addresses.
Separate each address with a semicolon or a carriage return character.
Select Specify Field Name to specify a field that contains one or more email addresses.
Select Specify Calculation to specify a calculation that generates one or more email
addresses.
If you use the Specify Field Name option to specify a value for the To, CC, or BCC entries,
you can also select Collect addresses across found set to specify that all the values from
this field in the current found set be used (to address a message to multiple recipients).
To stores the address(es) of the recipient(s).
CC stores the address(es) of the carbon copy recipient(s).
BCC stores the address(es) of the blind carbon copy recipient(s)
Note If you specify multiple email addresses for the To, CC, or BCC options, separate each
recipient's email address with a comma. Some email clients do not accept other separators,
such as a semicolon.
Subject indicates the title for the email message.
Message indicates the text of the email message. You can type the message as text, use a
field value, create a message from a calculation, or insert text from a file.
Select Attach File to select a file to send as an attachment to the mail message. For more
information, see Creating file paths.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 258
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Send Mail sends an intranet or Internet email message through an email application or via SMTP
(Simple Mail Transfer Protocol).
Notes
Sending mail using an email application is not supported in Custom Web Publishing or in
server-side scripts.
Server-side scripts support sending mail via SMTP. However, if you attach a file, that file
needs to be in a folder that FileMaker Server is allowed to export to. For more information,
see Get(DocumentsPath) function.
FileMaker WebDirect does not support the Attach File option. Web users must manually
attach saved or exported files to email messages. FileMaker WebDirect also does not
support the With dialog: Off option when sending mail via an email client.
FileMaker Go does not support the With dialog: Off option. The email message displays on
the device, and you can send the message manually.
If this script step sends an email message via an email client in FileMaker WebDirect, limit
the To, CC, BCC, Subject, and Body options to 2000 characters total. If the email message
contains more than 2000 characters, the web browser may not allow FileMaker WebDirect
to send the message.
To send mail through an email application, you must have a supported email application
installed and configured properly. In Windows, a [Mail] section in the Win.ini file is required.
If you select Multiple emails and Collect addresses across found set, FileMaker Pro
generates an email message for every record in the found set. Each message is addressed
to everyone specified in the TO, CC and BCC boxes for every record in the found set.
You can create a PDF or a Microsoft Excel file from your data to send as an attachment. For
more information, see Save Records As PDF and Save Records As Excel.
The Send Mail script step does not control the font’s appearance. Use the email client to
make any changes to the font.
FileMaker Pro sends email messages as plain text. To edit the message's contents and
formatting, choose to send the message through an email client and set the With dialog
option to On. You can then edit the message within the email client before it is sent.
FileMaker Pro verifies the SSL certificate of an SMTP server that is using an encrypted
connection. If the certificate cannot be verified, users can choose to connect anyway or
cancel to skip this script step. If the certificate cannot be verified and the Set Error Capture
script step is set to On, this script step behaves as if the server were unavailable. If the
certificate cannot be verified in server-side scripts, Custom Web Publishing, and
FileMaker WebDirect, this script step behaves as if it had been canceled by the user.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go Partial
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 259
Example 1
Goes to the Customers layout, performs a find, and sends a prewritten email to the address in the
Email field in the current record without prompting the user.
Go to Layout ["Customers"]
Perform Find [Restore]
Send Mail [Send via E-mail Client; With dialog: Off; To: Customers::Email;
Subject: Invoices::Summary; Message: "Dear Customer,¶¶Thank you for your
business."]
#The Collect addresses across found set option is not selected.
Example 2
Saves the current record as a PDF, then emails the PDF to the address in the Email field in the
current record.
Go to Layout ["Print Invoices"]
Save Records as PDF [Restore; With dialog: Off; "Invoice.pdf"; Current
record]
Send Mail [Send via E-mail Client; With dialog: Off; To: Customers::Email;
Subject: Invoices::Summary; Message: "Dear Customer,¶¶Thank you for your
business. Your invoice is attached."; "Invoice.pdf"]
Go to Layout [original layout]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 260
AVPlayer Play
Purpose
Plays audio, video, or images from a container field, layout object, or URL.
Format
AVPlayer Play [Object/Field/URL; Object: <value or formula>; Field:
<table::field>; URL: <value or formula>;
Presentation: Start Full Screen/Full Screen Only/Start Embedded/Audio
Only;
Disable Interaction: Yes/No; Hide Controls: Yes/No; Position: <value or
formula>;
Start Offset: <value or formula>; End Offset: <value or formula>]
Options
One of the following options specifies the source for the media:
Object specifies the layout object to play the media from.
Field specifies the container field to play the media from. The field doesn’t need to be
present on the layout.
URL specifies the URL to play the media from. You can type the URL or create a URL
from a calculation.
If no source is specified, the script step will use the active layout object, when possible.
Presentation specifies how to display the media. If the source for the media is a field or a
URL, the only options for Presentation are Full Screen Only and Audio Only.
Start Full Screen starts playing the media in full screen but allows changing the
presentation to embedded.
Full Screen Only plays the media in full screen.
Start Embedded starts playing the media as embedded but allows changing the
presentation to full screen.
Audio Only plays only the audio.
Disable Interaction enables or disables user interaction with the playback. If this option is
set to Yes, you cannot use the playback controls or gestures to interact with the media.
Yes disables user interaction with the playback.
No enables user interaction with the playback.
Hide Controls shows or hides the playback controls while the media plays. If you hide the
playback controls but enable interaction, you can use gestures instead of playback controls.
Yes hides the playback controls.
No shows the playback controls.
Position specifies how many seconds from the beginning of the media to start playback.
Start Offset specifies the beginning of the playback range in seconds from the beginning of
the media. The media can be played only within the playback range. For example, if you set
this option to 30, the user cannot rewind into or play the first 30 seconds of the media. The
default value for this option is 0, which allows the media to start from the beginning.
End Offset specifies the end of the playback range in seconds from the beginning of the
media. The media can be played only within the playback range. For example, if you set this
option to 100, the user cannot fast forward or play past the first 100 seconds of the media.
The default value for this option is 0, which allows the media to play to the end.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 261
Compatibility
Originated in
FileMaker Pro 14.0
Description
Use this script to play media files from container fields, layout objects, or URLs in FileMaker Go. The
media can be an audio, a video, or an image file.
If the foreground window contains a media file that is playing when the window moves to the back,
the media file continues to play.
Example 1
Plays a media file in full screen and hides playback controls after the OnRecordLoad script trigger is
activated:
AVPlayer Play [Field:Library::Video; Presentation: Full Screen Only; Hide
Controls: Yes]
Example 2
Resumes playing a media file from the position at which it was last stopped.
Set Field [Library::Last Stopped Position; GetAVPlayerAttribute
("position")]
AVPlayer Play [Field:Library::Video; Position: "Library::Last Stopped
Position"]
Example 3
Plays the media file in full screen for iPhone, and embedded for iPad.
If [Get(Device) = 3 //iPad]
AVPlayer Play [Object: "Container"; Presentation: Start Embedded]
Else If [Get(Device) = 4 //iPhone]
AVPlayer Play [Object: "Container"; Presentation: Start Full Screen]
End If
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 262
AVPlayer Set Playback State
Purpose
Pauses, resumes, or stops playing a media file that is playing or is paused.
Format
AVPlayer Set Playback State [Paused/Playing/Stopped]
Options
Paused pauses playing the media file.
Playing resumes playing a media file that has been paused.
Stopped stops playing the media file. After a player is set to stop, it cannot be set to play
with this script step.
Compatibility
Originated in
FileMaker Pro 14.0
Description
Use this script step to pause, resume, or stop playing a media file that is playing or is paused.
Example 1
Resumes playing a media file that has been paused.
AVPlayer Set Playback State [Playing]
Example 2
Stops a media file if it is playing.
If [GetAVPlayerAttribute("playbackState") = 1
AVPlayer Set Playback State [Stopped]
End If
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 263
AVPlayer Set Options
Purpose
Changes the settings for a media file that is playing or is paused.
Format
AVPlayer Set Options [Presentation: Start Full Screen/Full Screen Only/
Start Embedded/Audio Only;
Disable Interaction: Yes/No; Hide Controls: Yes/No; Disable External
Controls: Yes/No;
Pause in Background: Yes/No; Position: <value or formula>;
Start Offset: <value or formula>; End Offset: <value or formula>;
Sequence: None/Next/Previous]
Options
Presentation changes the setting for displaying the media.
Start Full Screen starts playing the media in full screen but allows changing the
presentation to embedded.
Full Screen Only plays the media in full screen.
Start Embedded starts playing the media as embedded but allows changing the
presentation to full screen.
Audio Only plays only the audio.
Disable Interaction changes the setting for enabling or disabling user interaction with the
playback. If this option is set to Yes, you cannot use the playback controls or gestures to
interact with the media.
Yes disables user interaction with the playback.
No enables user interaction with the playback.
Hide Controls changes the setting for showing or hiding the playback controls while the
media plays. If you hide the playback controls but enable interaction, you can use gestures
instead of playback controls.
Yes hides the playback controls.
No shows the playback controls.
Disable External Controls enables or disables the iOS playback controls on the lock
screen or control panel when the media is playing or is paused.
Yes disables the iOS playback controls.
No enables the iOS playback controls.
Pause in Background changes the setting for playing the audio when FileMaker Go is
moved to the background. The video always pauses when FileMaker Go is moved to the
background.
Yes pauses the audio when FileMaker Go is moved to the background.
No continues playing the audio when FileMaker Go is moved to the background.
Position specifies how many seconds from the beginning of the media to move the current
playback.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 264
Start Offset specifies the beginning of the playback range in seconds from the beginning of
the media. The media can be played only within the playback range. For example, if you set
this option to 30, the user cannot rewind into or play the first 30 seconds of the media. The
default value for this option is 0, which allows the media to start from the beginning.
End Offset specifies the end of the playback range in seconds from the beginning of the
media. The media can be played only within the playback range. For example, if you set this
option to 100, the user cannot fast forward or play past 100 seconds of the media. The
default value for this option is 0, which allows the media to play to the end.
Sequence specifies which media file should play next.
None plays no additional media.
Next plays the next media.
Previous plays the previous media.
Compatibility
Originated in
FileMaker Pro 14.0
Description
Use this script step to change the settings for audio, video, or image files when the file is playing or
is paused.
Example 1
Changes the setting of a media file that is currently playing to start the playback 50 seconds from
the beginning of the file.
AVPlayer Set Options [Position: 50]
Example 2
Enables user interaction with the playback after the video has played for 30 seconds.
AVPlayer Play [Object: "Container"; Disable Interaction: Yes]
Pause/Resume Script [Duration (seconds): 30]
AVPlayer Set Options [Disable Interaction: No]
Example 3
Pauses the audio file that is playing if FileMaker Go moves to the background.
AVPlayer Set Options [Pause in Background: Yes]
Where the script step runs Supported
FileMaker Pro No
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution No
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 265
Refresh Portal
Purpose
Refreshes the relationship and contents of the named object.
Format
Refresh Portal [Object Name: <object name>]
Options
Object Name is a named object on the current layout. If Object Name is not specified,
Refresh Portal refreshes the active layout object.
Compatibility
Originated in
FileMaker Pro 14.0
Description
Refresh Portal updates the join relationship and contents of a portal. Use Refresh Portal when a
global field used in the portal’s filter calculation has been modified. For example, Refresh Portal with
the OnObjectExit script trigger will refresh a portal after users commit a change in a field used in the
portal’s filter calculation.
Notes
In FileMaker WebDirect, Refresh Portal performs the Refresh Window script step.
If the layout object specified for Object Name is not a portal, Refresh Portal performs the
Refresh Object script step.
Refresh Portal acts on the foreground window of the current file.
Example 1
Sets the value of a global field used in a portal's filter calculation, then updates the portal.
Set Field [Customer::Filter; 16]
Refresh Portal [Object Name: "Customer Orders"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect Yes
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 266
Send DDE Execute (Windows)
Purpose
Sends a DDE command to another application to execute commands in that application.
Format
Send DDE Execute [Service Name: <service name>; Topic: <topic text or
filename>; Commands: <commands>]
Options
Service Name is the name of the application that executes the commands. Refer to the
documentation of the application you specify for the valid service name. You can enter the
service name directly as text or click Specify to create the service name from a calculation.
Topic is a filename or text string that describes the topic that the application executes the
commands on. Refer to the documentation of the application specified in the Service Name
for valid topics. You can enter the topic name directly as text or click Specify to create the
topic name from a calculation. For more information, see Creating file paths.
Commands are a calculated value or text string that specifies what the application does.
Refer to the documentation of the application specified in the Service Name for valid
commands and formats. You can enter the commands directly as text or click Specify to
create the commands from a calculation.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
This script step sends a DDE (Dynamic Data Exchange) command to another application to execute
a series of commands available in that application.
FileMaker Pro sends DDE execute commands, but does not receive them.
Because DDE is a Windows feature, if you run a script containing a Send DDE execute
script step on an OS X-based computer, the script step is ignored. (An error code is
generated, which can be captured with the Get(LastError) function.)
When a FileMaker Pro script first establishes a DDE connection, the connection stays open
to execute subsequent script steps for the same service name and topic. If the script
includes another DDE Execute script step using a different service name or topic,
FileMaker Pro closes the current connection and opens another with the new service name
and topic. All open connections close when the script is completed.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 267
Example 1
Opens a URL in Internet Explorer. (Internet Explorer must be open when this step executes.)
Send DDE Execute [Service Name: "iexplore"; Topic: "WWW_OpenURL";
Commands: "www.filemaker.com"]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 268
Perform AppleScript (OS X)
Purpose
Sends AppleScript commands to another application.
Format
Perform AppleScript [“<applescript text>”]
Options
Calculated AppleScript specifies a calculation to use as the AppleScript text.
Native AppleScript is the text of an AppleScript (up to 30000 characters). Indenting of
repeat loops and conditional statements is not supported.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can create a calculation to generate the AppleScript commands to be sent, or you can type the
commands directly into the Native AppleScript text area.
For calculated scripts and scripts stored in FileMaker Pro fields, the AppleScript commands are
compiled each time the script is performed. If you type the script into the Native AppleScript text
area, then FileMaker Pro compiles the script and detects any scripting or system errors. (The script
is recompiled whenever it's edited.)
Note Because AppleScript is an OS X feature, if you run a script containing a Perform AppleScript
script step on a Windows computer, the script step is ignored. (An error code is generated, which
can be captured with the Get(LastError) function.)
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 269
Tips on usage
FileMaker Pro can use the Perform AppleScript script step to send Apple events to itself
or to FileMaker Pro software running on other machines.
Use Perform AppleScript to pass image data between FileMaker Pro and other
applications. With AppleScript, you can pass images stored in container fields to other
applications or pass images into FileMaker Pro container fields.
Use Perform AppleScript to communicate with applets and other scriptable applications.
For example, if you have created an AppleScript applet with sub-routines, you can call
the handlers using the Perform AppleScript command, like this:
Perform AppleScript ["tell application "My Applet" to
doMyRoutine()"]
Example 1
Opens the Documents folder of the current OS X User.
Perform AppleScript ["tell application "Finder" (*enter line break*)
activate (*enter line break*) set x to path to documents folder (*enter
line break*) open x (*enter line break*) end tell"]
Example 2
Sets the bounds of the Documents window to the specified size. The Documents folder must be
open before this script runs.
Perform AppleScript ["tell application "Finder" to set bounds of window
"Documents" to {170, 70, 1000, 600}"]
Example 3
Calculates and performs the AppleScript to install a network printer. "\" tells FileMaker Pro to
recognize the symbol that follows as a character and not as a calculation operator.
Perform AppleScript ["do shell script \"lpadmin -p " & Printers::Name & "
-E -v lpd://" & Printers::IP Address & " -P /Library/Printers/PPDs/
Contents/Resources/" & Substitute ( Printers::Driver Name ; " " ; "\\\ " )
& ".gz -D \\\"" & Printers::Description & "\\\"\""]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 270
Execute SQL
Purpose
Executes any SQL statement on an ODBC data source.
Format
Execute SQL [With dialog: On/Off; ODBC: <datasource name>; <native SQL
or calculated SQL>]
Options
With dialog specifies whether to display the Specify SQL dialog box, the Select ODBC Data
Source dialog box, and the dialog box for entering a password when the script step is
performed.
ODBC Data Source displays the Select ODBC Data Source dialog box. Select a data
source from the list, click OK, and enter a valid user name and password.
Note Select Save user name and password if you set With dialog to Off, or users may be
unable to access your data source.
Calculated SQL text specifies a calculation to use as the SQL query.
SQL text lets you manually enter a SQL query statement.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
You can use this script step to manage data in an ODBC data source through an ODBC SQL
interface. This provides more control over the FileMaker Pro interaction with ODBC data sources.
You can add multiple Execute SQL steps to a script.
Important See Get functions for information about error handling.
Get(LastExternalErrorDetail) function returns the latest error state returned by ODBC.
Get(LastError) function returns the last FileMaker Pro error.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Partial
FileMaker Go No
Custom Web Publishing Partial
FileMaker WebDirect Partial
Runtime solution No
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 271
Notes
SQL statements are limited to a maximum length of 256 K characters (512 KB).
FileMaker Server, FileMaker WebDirect, and Custom Web Publishing support this script
only if the With dialog option is set to Off.
If you use the Execute SQL script step to send ODBC data that contains Unicode strings,
your ODBC driver must support Unicode. Otherwise, the results may be inconsistent.
ODBC import, the Execute SQL script step, and external SQL data sources are not
supported in runtime solutions created with FileMaker Pro Advanced.
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.
Example 1
Updates records in the Employees table of an external ODBC data source.
Execute SQL [With dialog: On; SQL Text: 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]
Example 2
Calculates and performs an SQL statement to update records in the Customers table of an external
ODBC data source.
Execute SQL [With dialog: On; Calculated SQL Text: "INSERT INTO Customers
(Company, LastName) VALUES (" & Customers::Company & "," & "N'" &
Customers::Last & "')"]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 272
Send Event
Purpose
In Windows, performs an action in another application; in OS X, sends an Apple event to another
application.
Format
Windows: Send Event ["avet"; "<event name>"; "<File or Calculation or
Text>"]
OS X: Send Event ["<Target Application>"; "<Event Class>"; "<Event ID>",
"<Document or Calculation or Script Text>"]
Options (Windows)
Send the <event name> message lets you choose between the following:
open document/application tells FileMaker Pro to open a document file or application.
Documents are opened using the application that Windows has associated with the
document’s file type.
print document tells FileMaker Pro to print a document in another application.
File allows you to specify a document/application to open, or a document to print. For more
information, see Creating file paths.
Calculation allows you to create a message from a calculation.
Text allows you to manually enter text for the message to be sent.
Bring target application to foreground activates the target application and display it on
the screen. Displaying the target application can slow down the performance of your script.
If Bring target application to foreground is not selected, the event is performed in the
background.
Options (OS X)
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.
do script tells FileMaker Pro to perform a script in the language of the target
application. Click Specify Application to select an application, and use Document to
select the document to use with the target application. Or, select Script text and enter
script text or type in the name of the script (make sure it is one that will be recognized
by the target program).
other displays the Specify event dialog box, where you can manually enter the Apple
event Event class and Event ID.
Document allows you to select the document you want used with the target application. For
more information, see Creating file paths.
Calculation allows you to create a calculation that generates a value you want to send with
the event.
Bring Target Application to foreground activates the target application and displays it on
the screen. Displaying the target application can slow down the performance of your script.
If Bring Target Application to foreground is not selected, the event is performed in the
background.
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 273
Wait for event completion before continuing tells FileMaker Pro to wait until the event is
finished before continuing. If you don't want to wait until the event is completed, deselect
this option.
Copy event result to the clipboard copies the resulting events data to the Clipboard, from
which it can later be retrieved. This option is disabled if Bring Target Application to
foreground is selected.
Specify Application allows you to select the target application.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Send Event starts another application, opens a document in another application, or prints a
document in another application (Windows); sends an Apple event to another application (OS X).
Each Send Event script step sends one event. You can include more than one Send Event
in a script.
When specifying a document or application by calculation or text, the file type or application
name will appear as <unknown> in the script definition.
Windows: For additional scripting capabilities, you can create a program in Basic or C and
run that program with this script step.
OS X: When FileMaker Pro sends an Apple event, it sends text (not compiled) data. You
must know what information the target application expects to receive with an event.
Example 1
In OS X, opens the TextEdit application.
Send Event ["TextEdit", "aevt", "oapp"]
Example 2
In Windows, opens the Notepad application.
Send Event ["aevt"; "odoc"; "NOTEPAD.EXE"]
Example 3
In Windows, opens the image.bmp file with its default application.
Send Event ["aevt"; "odoc"; "image.bmp"]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 274
Comment
Purpose
Adds comments to the list of steps in the script.
Format
#<comment text>
Options
<comment text> lets you enter comments.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
Use comments to document your script. Comments appear in bold and are prefaced with a #.
Comments are present only when you are viewing the script and do not appear when the script is
performed.
Notes
To add a new line in the comment text, press:
Windows: Ctrl+Enter or Alt+Enter
OS X: Ctrl-Return or Opt-Return
Comments print in italics.
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Yes
Custom Web Publishing Yes
FileMaker WebDirect Yes
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 275
Example 1
Shows how comments are used to explain script steps.
Go to Layout ["Invoices"]
#Find all invoices for the current customer
Find Matching Records [Replace; Invoices::Customer ID]
#Sort found set by Invoice ID
Sort Records [Restore; With dialog: Off]
#Save all records in the found set as a PDF
Save Records as PDF [With dialog: Off; "Customer Backup.pdf"; Records
being browsed]
#Go back to the original layout
Go to Layout [original layout]
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 276
Flush Cache to Disk
Purpose
Immediately flushes the FileMaker Pro internal file cache to the computer's hard disk.
Format
Flush Cache to Disk
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
FileMaker Pro automatically flushes changes from its internal file cache to the computer's hard disk
during idle time. Use this script step to force FileMaker Pro to flush its internal file cache after
extensive changes have been made through script steps such as the Import Records script step or
the Replace Field Contents script step.
Example 1
Assigns serial numbers to all records in the found set and flushes the changes to the disk.
Perform Find [Restore]
Sort Records [Restore; With dialog: On]
Go to Record/Request/Page [First]
Replace Field Contents [With dialog: Off; Products::Serial Number; Serial
numbers]
Flush Cache to Disk
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 277
Exit Application
Purpose
Closes all open files; and in FileMaker Pro, exits the application.
Format
Exit Application
Options
None.
Compatibility
Originated in
FileMaker Pro 6.0 or earlier
Description
The Exit Application script step does the following in other FileMaker clients:
In FileMaker WebDirect, logs out the current web session and returns you to the
FileMaker WebDirect Launch Center.
In FileMaker Go, closes all open databases and leaves FileMaker Go running.
In Custom Web Publishing, logs out the current web session, closes virtual windows, but
does not exit the web browser.
Example 1
Prevents the user from opening the database on a weekend. Started by the OnFirstWindowOpen
script trigger.
Allow User Abort [Off]
If [DayName ( Get ( CurrentDate ) ) = "Saturday" or DayName ( Get (
CurrentDate ) ) = "Sunday"]
Exit Application
End If
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server Yes
FileMaker Go Partial
Custom Web Publishing No
FileMaker WebDirect Partial
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 278
Get Directory
Purpose
Sets a variable to the fully qualified path of a specified folder.
Format
Get Directory [Allow Folder Creation; <variable>; <dialog title>; <default
location>]
Options
Allow folder creation lets users create new folders while they browse the file system.
Variable sets a local or global variable to the path of the selected folder. See the Set
Variable script step.
Dialog Title lets you specify a custom name for the folder selection dialog box.
Default Location lets you specify the path that the folder selection dialog box displays
when it opens.
Compatibility
Originated in
FileMaker Pro 14.0
Description
This script step prompts the user to select a folder, then it sets a variable to the fully qualified path of
the selected folder.
In Windows, the path format is /Drive:/<selected folder>/.
In OS X, the path format is /DriveName/<selected folder>/.
Example 1
Opens a folder selection dialog box that displays the desktop, prompts the user to select the
Pictures folder, then sets Products::Pictures Folder to the path of the selected folder.
Get Directory [$DIRECTORY; "Select the Pictures folder";
Get(DesktopPath)]
Set Field [Products::Pictures Folder; $DIRECTORY]
Where the script step runs Supported
FileMaker Pro Yes
FileMaker Server No
FileMaker Go No
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Yes
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 279
Example 2
Performs a find, prompts the user to select a folder to export to, then loops through records to export
files that are in the Products::Picture field.
Perform Find [Restore]
Get Directory [Allow Folder Creation; $DIRECTORY; "Export to Folder"]
Loop
Set Variable [$PATH; Value:$DIRECTORY & Products::Picture]
Export Field Contents [Products::Picture; $PATH]
Go to Record/Request/Page [Next; Exit after last]
End Loop
Miscellaneous script steps
FILEMAKER PRO SCRIPT STEPS REFERENCE 280
Enable Touch Keyboard
Purpose
Enables or disables the touch keyboard.
Format
Enable Touch Keyboard [On/Off/Toggle]
Options
On enables the touch keyboard.
Off disables the touch keyboard.
Toggle switches between enabling and disabling the touch keyboard.
Compatibility
Originated in
FileMaker Pro 14.0
Description
Use this script to enable or disable the touch keyboard in FileMaker Go or Windows. Enable Touch
Keyboard is used only for fields; it has no impact on the touch keyboard for dialog boxes.
You can use the Get(TouchKeyboardState) function to check the current setting of the touch
keyboard.
Notes
This script step is not supported in FileMaker Pro for Windows 7.
Example 1
In FileMaker Go, enables the touch keyboard.
Enable Touch Keyboard [On]
Example 2
Checks the current setting of the touch keyboard and disables the touch keyboard if it is enabled.
If [ Get ( TouchKeyboardState ) = 1]
Enable Touch Keyboard [Off]
End If
Where the script step runs Supported
FileMaker Pro Partial
FileMaker Server No
FileMaker Go Yes
Custom Web Publishing No
FileMaker WebDirect No
Runtime solution Partial
Glossary
FILEMAKER PRO SCRIPT STEPS REFERENCE 281
Glossary
A
Access key (Windows)
A key that activates a menu, menu item, or control when used with the ALT key. In Windows,
this key corresponds to the underlined letter on a menu, command, or dialog box option.
Access privileges
Permission to view and work with certain records, fields, layouts, value lists, and scripts and to
perform selected activities in a file.
Account
A user name and (usually) password that accesses a file with a defined level of privileges. There
are two predefined accounts: Admin and Guest. Admin is a Full Access account that can be
renamed or deleted. At least one Full Access account that is authenticated via FileMaker must
be defined for each file. Guest account is a special account that cannot be renamed or deleted,
but can be made active or inactive.
Active pane
In the Script Workspace, the pane (scripts pane, script editing pane, or script steps pane) that's
active for use.
Active tab
In the Script Workspace, the tab in the script editing pane that's active for use.
ActiveX Automation
A Windows programming and scripting protocol that allows external control of specific
commands and actions in FileMaker Pro, including opening and closing FileMaker Pro files,
toggling the application's visibility, and performing FileMaker Pro scripts.
Alpha channel
The alpha channel of an image stores transparency information and controls the transparency
of the red, green, and blue color channels.
Animation
A visual effect that provides feedback while you are performing actions in FileMaker Pro and
FileMaker Go, such as switching between slide panels.
API (Application Programming Interface)
A set of software application building blocks, such as data structures, variables, procedures,
and functions, used by programmers.
AppleScript
A scripting language you can use to control functions of OS X and of applications that support
AppleScript (often called scriptable applications).
Apple events
An OS X technology that lets applications communicate with one another. FileMaker Pro can
send and receive Apple events to and from applications that support them.
Ascending sort order
Alphabetical sequence (A to Z) for words, lowest to highest order for numbers, and earliest to
latest for dates and times.
B
FILEMAKER PRO SCRIPT STEPS REFERENCE 282
ASCII character set
American Standard Code for Information Interchange. A standard character set used by
computer systems worldwide (often extended for different alphabets).
Authentication
The process of checking the validity of an account and password (if one is defined) before
assigning privileges and allowing access to a system or a file. An account authenticated via
FileMaker Pro or FileMaker Server is referred to as a FileMaker account. (FileMaker Server can
also authenticate an account via External Server — an external authentication system such as
Apple Open Directory, or a Windows domain.)
Authorization
Allowing a file to access a protected file’s schema (including its tables, layouts, scripts, and
value lists). Such a file is an authorized file.
Auxiliary files
In a FileMaker Pro Advanced runtime solution, files that are bundled with a primary file.
B
Badge
An icon indicating that conditional formatting, script triggers, placeholder text, or tooltips have
been applied to a field, object, or layout; that find is available for a field; that an object is a
button, popover button, or button bar; or that a solution is a favorite.
Base directory
For container fields that store an external reference, the directory in which the referenced data is
stored. You can also specify a file system path or a calculation for each open storage container
field.
Binding key
In FileMaker Pro Advanced, a case-sensitive key from 1 to 24 characters long that links the
components of a runtime solution.
Blank layout
A layout that contains empty body, header, and footer parts. (In previous versions of
FileMaker Pro, a Blank layout was a predefined layout type.)
Body part
A layout part that contains individual records from a file.
Boolean value
A Boolean value is either true or false. A field containing any number except zero evaluates as
true. A field containing zero, no data, or content that does not resolve into a number evaluates
as false. For example, a field containing “ABC,” “ABC0,” or an empty field is false. A field
containing “1” or “ABC2” is true.
Break field
In a subsummary part, records are grouped (sorted) by values in another field, called the break
field. Whenever the value of the break field changes, the report “breaks” and FileMaker Pro
inserts the subsummary part.
C
FILEMAKER PRO SCRIPT STEPS REFERENCE 283
Browse mode
The FileMaker mode in which you enter and edit information in fields. Groups of fields make up
the records of your file. You can view one record at a time (click Form View in the layout bar),
view your records in a list (click List View), or view records arranged in a spreadsheet-like table
(click Table View).
(Use Browse mode to enter and edit your information; use Layout mode to design how your
information is displayed. Use Find mode to find records that match search criteria; use Preview
mode to display how your records will print.)
Button
A layout object that performs a specified script in Browse or Find mode.
Button bar
A layout object that displays buttons or popover buttons in a horizontal or vertical bar. Button
bars contain segments that represent individual buttons consisting of any combination of a
button icon and a text label.
C
Cache
The amount of memory assigned to FileMaker Pro. A larger cache size increases performance.
A smaller cache size saves data to the hard disk more frequently, offering greater protection in
case of a system crash.
Calculation field
A field that returns the result of a calculation of values. You can create a formula for the
calculation using functions, constants, operators, and information from other fields in the same
record.
Cascading style sheets
A system of codes or tags that define how a web browser displays information in a webpage.
Cascading style sheets provide more control over the layout and appearance of webpages than
HTML. Cascading style sheets work like templates for webpages. If a web age contains
cascading style sheets, users must view it in a browser that supports cascading style sheets.
Character encoding
The character set or code page of a file. If necessary, you can specify a character set to be used
when importing, exporting, indexing, sorting, and spell-checking files. FileMaker supports ASCII,
Windows ANSI, Macintosh, Japanese (Shift-JIS), Unicode UTF-8, Unicode UTF-16, and
Unicode UTF-16 Windows.
Chart
A graphical depiction that makes it easy to compare data and see patterns and trends.
Chart legend
A key that identifies the colors assigned to a data series in a chart.
Client
A user that opens a file that is shared on a network, published in a browser, or shared via
ODBC/JDBC. FileMaker Network settings and privileges determine how FileMaker Pro and
FileMaker Go clients interact with files hosted through FileMaker Pro and FileMaker Server.
Client application
The application that requests data (using SQL) from a data source (using ODBC or JDBC).
Also, FileMaker Pro is a client application when it accesses a file hosted by FileMaker Server.
C
FILEMAKER PRO SCRIPT STEPS REFERENCE 284
Client/server architecture
The relationship between two networked computers that share resources. The client requests
services from the server, and the server provides services to the client.
Clipboard
A temporary storage area in computer memory where FileMaker Pro places the most recent
selection you've cut or copied.
Clone
A copy of a FileMaker Pro file that contains all the field definitions, tables, layouts, scripts, and
page setup options, but none of the data.
Column
When a layout is viewed in Table View, a column corresponds to a field.
Combo box
A type of list you can set up in Layout mode. In the Data tab in the Inspector, select
Include arrow to show and hide list. The list will open only when users click the arrow, not
when they enter the field.
Commit
To save changes to a file. Certain actions such as navigating between records, finding, and
sorting do not change the file’s modification date. Other actions such as changing data in a
record or changing a layout do change the file’s modification date.
Concealed edit box
A field set up to conceal confidential information by displaying dots in place of data.
Consistency check
A consistency check examines a file that may have been damaged due to, for example, an
unexpected quit. FileMaker Pro reads every file block and verifies that the internal structure of
the block is valid and the block is properly linked to other blocks in the file. (A consistency check
does not read all the data within each file block or check the schema or higher-level structures in
the file; these tasks are performed by file recovery.)
Constant
In a formula, an unchanging value. For example, a constant can be a field name, a text literal
("Total:"), or a number. The value of the constant doesn't change from record to record as the
formula is evaluated.
Container data type
Pictures, movies, and documents such as Microsoft Word files and PDF files can be inserted in
a container field. Data in container fields can be embedded in the field, stored by file reference,
or stored externally.
Context
The table occurrence from which calculations and scripts are begun, and from which a
relationship is evaluated in the relationships graph.
Convert
Opening a data file from another application, which creates a new FileMaker Pro file containing
the data.
Also refers to opening a file created with a previous version of FileMaker Pro.
D
FILEMAKER PRO SCRIPT STEPS REFERENCE 285
Custom function
A function that is not one of the default FileMaker Pro functions. In FileMaker Pro Advanced,
you can create custom functions that can be reused anywhere in the file.
Custom menu
A menu that is not one of the default FileMaker Pro menus. In FileMaker Pro Advanced, you can
create custom menus, menu items, and menu sets.
D
Data Entry Only privilege set
One of the three predefined privilege sets that appear in every file. The Data Entry Only
privilege set allows read/write access to the records in a file, but not design access (for
example, the ability to create layouts and value lists).
Data point
In a chart, the value of data plotted on the x or y axis displayed as a column, bar, point, bubble,
or slice.
Data series
Data points that are plotted in a chart. When multiple data series are charted, each data series
is displayed in a unique color and is defined in the chart’s legend, if included.
Data source
A named reference that provides access to another FileMaker file or to an ODBC database.
ODBC data sources are also referred to as external SQL sources (ESS).
In charting, the origin of the data to be charted — current found set, current record (delimited
data), or related records.
Data source name (DSN)
A data structure that contains the information about a specific file that an ODBC driver needs in
order to connect to it.
Data Viewer
A FileMaker Pro Advanced feature that lets you monitor expressions such as field values, local
and global variables, and calculations. You can monitor expressions while running scripts or
while testing them in the Script Debugger. You can also monitor field values and variables in the
file.
Database file
A component of a FileMaker solution.
Database
The arrangement of tables and fields and their interrelationships in a file.
Database Design Report
A FileMaker Pro Advanced tool that creates a report of your database schema.
Database Encryption
A form of encryption that protects “data at rest.” For FileMaker, data at rest is a FileMaker Pro
file, and its temporary files, while it is being stored on disk (and not open). An encrypted file is
protected from unauthorized access with an encryption password. FileMaker Pro Advanced is
required to encrypt files. Encrypted files can be decrypted and re-encrypted as needed.
Database Management System (DBMS)
An application that allows users to store, process, and retrieve information in a database.
D
FILEMAKER PRO SCRIPT STEPS REFERENCE 286
Descending sort order
Reverse alphabetical sequence (Z to A) for words, highest to lowest order for numbers, and
latest to earliest dates and times.
Developer Utilities
A FileMaker Pro Advanced feature that lets you bind files into a runtime solution, display files in
Kiosk mode, prevent users from modifying the design or structure of databases, and
automatically rename sets of files and update links to related files.
Dialog window
A document window in a modal state. Its behavior is similar to the behavior of a window when a
running script is paused. You can create and customize a dialog window using the New Window
script step.
Document window
A standard modeless FileMaker window. You can create and customize a document window
using the New Window script step.
Domain name
The primary subdivision of Internet addresses, which is indicated by the last part of an Internet
address after the final period (or dot). In the United States, the standard domains are .com, .edu,
.gov, .mil, .org, and .net. In other countries, the top-level domain is usually the country domain.
Domain name server (DNS)
A server that matches up the URL of a website (for example http://www.filemaker.com) with its
proper numeric IP address (for example 12.34.56.78).
Driver
The ODBC or JDBC driver translates SQL queries into commands that a DBMS can
understand. It processes ODBC/JDBC calls, submits SQL requests to the data source, and
returns the data back to the driver manager, which then routes it to the requesting application
(for example, FileMaker Pro).
Driver manager
The control panel that manages communication between requesting applications and data
sources. When an application makes a request via ODBC/JDBC, the driver manager routes the
request through the correct driver to the correct data source and returns the data to the
requesting application. All ODBC/JDBC drivers and data sources to be used on that computer
are registered with the driver manager.
Drop-down calendar
A field set up to display an interactive monthly calendar when a user enters the field in Browse
or Find mode.
DTD (Document Type Definition)
A formal description of a particular type of XML. It defines a document structure, including the
names of data elements and where they may occur within the structure. Valid XML conforms to
the rules established in its DTD.
Dynamic guides
In Layout mode, guidelines that extend horizontally and vertically to help you move, resize, or
align objects. Dynamic guides also “snap to” the upper and lower boundaries and the centers of
objects as you move, resize, or align the objects.
E
FILEMAKER PRO SCRIPT STEPS REFERENCE 287
E
Embedded
For container fields, a file that is stored in the container field. Container data can also be stored
by reference or stored externally.
Encryption password
The password required to open an encrypted file. For FileMaker Pro, the encryption password is
required for the FileMaker Pro user who opens the file, but not for the client who opens a file
hosted by FileMaker Pro. FileMaker Pro Advanced is required to enable, disable, or change an
encryption password.
Envelope layout
A predefined layout with fields arranged for printing on standard business envelopes.
Ethernet
A type of fast local area network used for connecting computers and peripherals within the
same building or campus.
Export
To save data from one file so that it can be used in another file or in another application.
Expression
A value or any computation that produces a value. Expressions can contain functions, field
values, and constants and can be combined to produce other expressions.
Extended privilege
Privileges that determine the data sharing options that are permitted by a privilege set for a file.
For example, the Access via FileMaker WebDirect extended privilege determines whether the
privilege set allows accessing the file from a web browser.
External function
A function written in C or C++ as part of a third-party plug-in that extends the feature set of
FileMaker Pro or FileMaker Pro Advanced.
External script
A script used by a file, but defined in a different file. Use the Perform Script script step to select
a defined script from a related file, or to select a file reference to a file on your hard drive or
network.
F
Field
The basic unit of data in a record. You define a field to hold a specific, discrete category of data,
such as Last Name, Employee Photo, or to display the result of a calculation. You can define
text, number, date, time, timestamp, container, calculation, and summary fields. Field can also
refer to the object on a layout that displays the data, such as an edit box, checkbox set, or pop-
up menu.
Field boundary
In Layout mode, an outline that shows the size of a field. To see field boundaries, choose View
menu > Show > Field Boundaries. These boundaries only appear in Layout mode. However,
you can use the Appearance tab in the Inspector to format objects to have borders that do
appear in Browse mode and when you print the layout.
F
FILEMAKER PRO SCRIPT STEPS REFERENCE 288
Field label
Text on a layout or within a field that identifies a field. A field label can be the field name, other
text (such as instructions), or the result of a calculation. Field labels can appear in various
positions outside the field or as placeholder text within the field. You can change or delete a field
label if you want.
Field name
The name you assign to a field when you define the field. When you place a field onto a layout,
you can have FileMaker Pro also place an editable field label that matches the field name. You
can also use the field name as placeholder text. Fully qualified fields are displayed in
tablename::fieldname format.
Field type
The part of a field definition that determines what kind of data you can enter in the field and the
kinds of operations FileMaker Pro can perform with the data. FileMaker Pro can create text,
number, date, time, timestamp, container, calculation, and summary fields. (Global fields contain
the same value for all records in the file and can be of any type except summary.)
File path
The location of a file in an operating system as identified by the drive, folders, filename, and file
extension.
FileMaker Go
An application that lets you work with FileMaker Pro solutions (developed in FileMaker Pro) on
iPhone, iPod touch, or iPad.
FileMaker Network
A communications method built into FileMaker Pro that allows you to share files hosted by
FileMaker Pro or FileMaker Server with others over a network or in FileMaker Go. The
FileMaker Network settings and privileges you set up determine how other users (clients) can
open and use the shared file.
FileMaker WebDirect
A web application for accessing layouts from files in a web browser. Web clients use
FileMaker WebDirect to access layouts from files hosted by FileMaker Server.
Find mode
The FileMaker mode in which you specify criteria for finding a subset of records.
(Use Browse mode to enter and edit your information; use Layout mode to design how your
information is displayed. Use Find mode to find records that match search criteria; use Preview
mode to display how your records will print.)
Find request
In Find mode, a blank form based on the current layout. Enter search criteria into one or more
fields of the find request.
Firewall
A security system used to prevent unauthorized users from gaining access to a LAN. A firewall
usually has a single computer that is connected to the Internet, and all Internet traffic must pass
through that computer.
Floating document window
A standard modeless FileMaker window that stays on top of other windows while users work in
FileMaker Pro. You can create and customize a floating window using the New Window script
step.
F
FILEMAKER PRO SCRIPT STEPS REFERENCE 289
Focus
Indicates that a record, portal row, tab, option, field, repeating field repetition, layout part, or
layout object that has been activated by a click, the Tab key, a navigation button, or a script can
then be acted upon in some way. For example, you can change the value in a field that has the
focus; you can work with the data that’s in a record that has the focus; a calculation function can
return the number of the portal row that has the focus.
Footer part
Use the footer part for page numbers or dates. This part appears at the bottom of every screen
or page (unless you add a title footer). You can have only one footer in a layout. A field in the
footer displays data from the last record on that page.
Form View
Displays one record at a time. By default, fields appear on separate lines. To select this view,
click Form View in the layout bar.
Formatting bar
In Layout and Browse modes, the area that displays options for formatting text and objects. To
show or hide the formatting bar, click Formatting in the layout bar.
Formatting bar in Layout mode
Formula
A set of instructions that FileMaker Pro follows to calculate a value used in a field or as the
criteria for matching database records.
Found set
The set of records in a table that are made active when you search for data. When you find all
records, the found set is the entire table.
Full Access privilege set
One of the three predefined privilege sets that appear in every file. The Full Access privilege set
allows complete read/write access to a file, including making changes to privileges for the file.
Fully qualified name
The complete name of a field or layout, expressed using the format tableName::[field or
layout name], where “tableName” is the name of the underlying table occurrence in the
relationships graph upon which the field or layout is based. A fully qualified name identifies an
exact instance of a field or layout. Because fields and layouts with common names can be
based on different tables, FileMaker Pro uses fully qualified names to avoid errors in
calculations and scripts.
Function
A predefined, named formula that performs a specific calculation and returns a single, specific
value.
Function list separator
The punctuation character ; (a semicolon) that separates parameters in a function definition. If
you type a comma (,), FileMaker Pro automatically changes it to a semicolon after you close the
Specify Calculation dialog box.
G
FILEMAKER PRO SCRIPT STEPS REFERENCE 290
G
GIF (Graphics Interchange Format)
A platform-independent file format often used to distribute graphics on the Internet.
Global field
A field defined with the global storage option can contain one value that's used for all records in
a file. Use the value of a global field as a fixed value in calculations, to declare variables in If or
Loop script steps, or for fields that rarely need to be updated (for example, a company logo in a
container field). A global field can be any field type except summary. A global field can’t be
indexed.
Global variable
A global variable can be used in a calculation or script anywhere in a file, for example, other
scripts or file paths. The value of a global variable is not cleared until the file is closed.
Grammar
A precise description of a formal language, such as XML, consisting of sets of rules for how
strings (words) in the language can be generated, and how the strings can be recognized as
part of the language.
Grand summary
Total or other aggregate value for all records in the found set.
Grand summary part
Use grand summary parts to view and display summary information (totals, averages, and so
on) in summary fields for all records in the found set. You can add one grand summary part at
the top (leading) and one grand summary part at the bottom (trailing) of a layout.
Grid
In Layout mode, a series of nonprinting intersecting horizontal and vertical lines. The grid aligns
objects you create, resize, move, or position. Objects “snap to” the grid to help you create and
edit objects more precisely. Gridlines adjust when you change the unit of measure.
Grouped object
A collection of objects that behaves as one object in Layout mode.
Guest
A user who opens a protected file without specifying an account name and password. The
Guest account is assigned a privilege set that determines what guests can do in the file. Guest
access may be disabled for a file.
Guides
Nonprinting, movable horizontal and vertical guidelines to help you position and align objects in
Layout mode. An object's left or right boundary, top or bottom boundary, or center “snaps to” a
guide.
H
Handle
One of the small squares surrounding a selected object, and used to resize and reshape the
object.
I
FILEMAKER PRO SCRIPT STEPS REFERENCE 291
Header part
Use a header part for column headings, titles, and other information that appears only at the top
of every page on a layout. FileMaker Pro displays the header in Browse mode and prints it on
every page, except the first page if you add a title header. Fields added to a header are printed
on every page, using data from the first record on that page.
Homepage
The starting page for a website. It often has some form of a table of contents that allows viewers
to link to other parts of the website.
Host
After a file has been opened and enabled for sharing, the host is either the first FileMaker Pro
user to share the file, or the host is FileMaker Server. Once the host opens the file, other users
(clients) can access and change the file. All changes are stored in the file on the computer or
device where the file resides. FileMaker Network settings and privileges determine how
FileMaker Pro and FileMaker Go clients interact with files hosted through FileMaker Pro or
FileMaker Server.
HTML (Hypertext Markup Language)
A language that is used for displaying and accessing information on the World Wide Web.
HTTP (Hypertext Transfer Protocol)
The Internet protocol that defines how a web server responds to requests for files.
I
Import
To bring (copy) data from a table, another file, or another application into the current table. You
can also import scripts from one FileMaker Pro file into another.
Indexing
An option that can be enabled when defining (or changing) the definition of a field. When
indexing is enabled, FileMaker Pro builds a list of all the values that occur in the field in the
table. This improves the performance of tasks such as finding data, but it increases the size of
the file on disk.
Inline scroll bar
A scroll bar that appears only while scrolling is occurring.
Inspector
In Layout mode, a tool that allows you to view and edit the settings for objects, layout parts, and
the layout background. You can open multiple inspectors to view and format settings in different
tabs at the same time. To open the Inspector, choose View menu > Inspector. To open another
Inspector window, choose View menu > New Inspector.
Interactive container
A container field for which the Interactive content option in the Inspector is selected.
Interactive containers are rendered using the web browser technologies that web viewer uses.
Internet
An international network of many other networks that are linked using the TCP/IP network
protocol.
Internet service provider (ISP)
The company from which you purchase your connection to the Internet.
J, K
FILEMAKER PRO SCRIPT STEPS REFERENCE 292
Intranet
A private TCP/IP network of linked computers within a company or organization.
IP (Internet Protocol) address
For IPv4, a four-part number, usually formatted as 12.34.56.78, that uniquely identifies a
computer on the Internet; for IPv6, an eight-part number, usually formatted as
[2001:0DB8:85A3:08D3:1319:8A2E:0370:7334], that uniquely identifies a computer on the
Internet. When referenced in an application, IPv6 addresses must be contained in brackets; for
example, [2001:0DB8:85A3:08D3:1319:8A2E:0370:7334].
J, K
JDBC
A Java API that uses SQL statements to access data from, and exchange data with, many
database management systems. The JDBC driver communicates between your Java applet and
the FileMaker Pro or FileMaker Server data source.
JPEG (Joint Photographic Experts Group)
A platform-independent file format often used to distribute graphics on the Internet.
Key
A column (or columns) that makes a particular row unique (corresponds to a match field).
Kiosk
A FileMaker solution that runs full screen, without toolbars or menus. Users click buttons to
navigate. In FileMaker Pro Advanced, use the Developer Utilities to create Kiosk solutions. You
can bind Kiosk solutions into standalone runtime solutions.
L
Labels layout
A predefined layout with fields arranged for printing horizontally or vertically on mailing label
stock, and media and index sheets.
LAN (local area network)
A connection between computers within a location using cable or a wireless system.
Layout
An arrangement of fields, objects, pictures, and layout parts that represents the way information
is organized and presented when you browse, preview, or print records. You can design
different layouts for entering data, printing reports and mailing labels, displaying webpages, and
so on.
Layout bar
In the status toolbar, the area that displays options for working with layouts, such as the Layout
pop-up menu.
Layout bar in Browse mode
Layout bar in Layout mode
L
FILEMAKER PRO SCRIPT STEPS REFERENCE 293
Layout mode
The FileMaker mode in which you determine how information in fields is presented on the
screen and in printed reports.
(Use Browse mode to enter and edit your information; use Layout mode to design how your
information is displayed. Use Find mode to find records that match search criteria; use Preview
mode to display how your records will print.)
Layout part
A section of a layout that organizes or summarizes information. Layout parts include body,
header, footer, title header, title footer, top navigation, bottom navigation, leading and trailing
grand summary, and leading and trailing subsummary.
Layout pop-up menu
In the layout bar, a pop-up menu from which you can choose Manage Layouts (Layout mode)
or a defined layout (all modes).
Layout theme
A collection of coordinated styles that determine the color, object, part, and background
attributes, and the fonts used on a layout. Themes also enhance the appearance of a layout or
report and give all your layouts a consistent look. A theme does not control the placement or
behavior of fields or objects on a layout. A theme is assigned when you create a new layout, but
you can change the theme in Layout mode. You can also create a theme by changing the styles
used for the layout, and then saving the theme with a new name.
Layout tools
In the status toolbar in Layout mode, a collection of tools that includes the Selection tool
(pointer), Text tool, Line tool, Rectangle tool, Rounded Rectangle tool, Oval tool, Field/Control
tool, Button tool, Popover Button tool, Button Bar tool, Tab Control tool, Slide Control tool, Portal
tool, Chart tool, Web Viewer tool, Field tool, Part tool, and Format Painter tool.
Layout types
FileMaker Pro includes several predefined types of layouts and reports to display on different
types of devices (such as laptop computer screens or touch device screens), for different
purposes (such as browsing records, entering data, or printing reports, mailing labels, or
envelopes). After you choose a layout type, you can make additional choices.
To use a predefined layout type, in Layout mode, click New Layout/Report in the status toolbar.
The assistant guides you through creating the type of layout or report you want. After you finish
the assistant, use the tools and commands in Layout mode to tailor the layout for your needs.
LDAP (lightweight directory access protocol)
A protocol for accessing online directory services.
Link
On a webpage, text or a graphic which — when you click it — displays an associated webpage
or a specific element within a page.
Also, the HTML code that creates a link to another webpage or to a specific element within a
page.
M
FILEMAKER PRO SCRIPT STEPS REFERENCE 294
List View
Displays records one record at a time in a list format. To select this view, click List View in the
layout bar.
List view layout
A type of Report layout in which fields that you specify appear in columns across the screen or
page in one line. Field names are in the header part and the footer part is blank. (In previous
versions of FileMaker Pro, a List view layout was a predefined layout type.)
Locked object
An object on a layout that cannot be edited or deleted. To lock or unlock an object, select it in
Layout mode. In the Inspector, click the Position tab, then choose Lock or Unlock in the
Arrange & Align area. If an object is locked, its selection handles dim.
Lookup
A lookup matches records and copies data from a related table into a field in the current table.
After data is copied, it becomes part of the current table (as well as existing in the table it was
copied from). Data copied to a table doesn't automatically change when the values in the related
table change.
Lookup source field
The field in the related table that contains the data you want copied during a lookup.
Lookup target field
The field that you want data copied to during a lookup.
M
Many-to-many relationship
A correspondence between data in database tables in which more than one record in the first
table is related to more than one record in another table, and more than one record in that table
is related to more than one record in the first table.
Match field
For relational databases and lookups, a field in a source table and a field in a related table that
contain values you want to use to find matching records. (A match field is sometimes called a
key field or trigger field.) In the relationships graph, match fields appear in italics.
For importing records, values in the match fields determine which records in the source table
update which records in the target table.
Menu
A list of menu items. Each menu has a title that appears on the menu bar.
Menu bar
The area at the top of the window (Windows) or screen (OS X) that displays the installed menu
set.
Menu item
One item listed in a menu on the menu bar. A menu item corresponds with one command,
submenu, or separator.
Menu item properties
All the settings for a menu item, including platform, display title, shortcut, and action.
N
FILEMAKER PRO SCRIPT STEPS REFERENCE 295
Menu set
The collection of menus that installs on the menu bar.
Merge field
A placeholder on a layout for the contents of a field. A merge field expands or contracts in
Browse and Preview modes, or when printed, to fit the amount of data in the field for each
record.
Merge fields are useful for mail merge form letters; FileMaker Pro uses merge fields in
predefined Labels and Envelope layouts.
Merge variable
A variable inserted onto a layout that displays values from a local or global variable onto the
layout of the current record. You see the merge variable value in Browse, Find, and Preview
modes, and when you print records.
Modal window
A window that requires user action before users can continue working in FileMaker Pro. Use a
modal window to display alert messages or to collect information from users.
Mode
In FileMaker Pro, the four different environments (Browse, Find, Layout, and Preview) that you
use to work with your file.
Mode pop-up menu
A pop-up menu at the bottom of the document window from which you can choose a mode
(Browse, Find, Layout, or Preview). This menu is available in all modes.
Multi-key field
A match field that contains more than one value, each on a separate line. A multi-key field can
be used in one table involved in a relationship, to match several possible values in the match
field of the other table. Sometimes called a complex key field.
N
Navigation part
A layout part that appears above a title header part (top navigation part) or below a title footer
part (bottom navigation part), and can contain fields, objects, and other controls to help users
navigate a layout or solution. Navigation parts do not print or preview.
Network protocol
A network protocol (for example, TCP/IP) is a set of rules that govern how computers exchange
messages on a network.
New Layout/Report assistant
The New Layout/Report assistant guides you through creating a layout or report according to
options you choose. In Layout mode, click New Layout/Report in the status toolbar, or choose
Layouts menu > New Layout/Report.
O
FILEMAKER PRO SCRIPT STEPS REFERENCE 296
O
Object
On a FileMaker Pro layout, an object is a discrete entity or shape that you can select, move,
modify, delete, or name. Lines, fields, buttons, popovers, panel controls, portals, imported
graphics, blocks of text, tab controls, and web viewers are objects. Some objects, such as
portals, have multiple components; for example, a portal row is a component of a portal.
Object component
An element of an object, such as a portal row of a portal or a slide panel of a slide control.
ODBC
An API that uses SQL statements to access data from, and exchange data with, many database
management systems. FileMaker Pro uses ODBC drivers to share data (as a data source) and
to interact with data from other applications (as a client application).
1-away relationship
A correspondence between database tables in which two tables are directly related to each
other, with no other tables between them.
One-to-many relationship
A correspondence between data in database tables in which one record in the first table is
related to more than one record in another table.
One-to-one relationship
A correspondence between data in database tables in which one record in the first table is
related to one record in another table.
Operands
Components of a formula. For example, in the formula Quantity*Price, Quantity and Price are
the operands.
Operators
In calculations, symbols that indicate how to combine two or more expressions. These include
the standard arithmetic operators (+, -, /, *), logical operators that set up conditions that must be
met to make a value true or false (AND, OR, XOR, and NOT), and find operators (<, =, @) that
help you limit the records defined in a find request.
In the relationships graph, symbols that define the match criteria between one or more pairs of
fields in two tables. These include: != (not equal), > (greater than), < (less than), = (equal), <=
(less than or equal to), >= (greater than or equal to) and x (all rows, or Cartesian product).
P
Panel control
Panel controls include the tab control and slide control. Individual panels of these controls are
tab panels and slide panels, respectively.
Parent script
A script that defines script parameters and can call other scripts.
Part label
In Layout mode, the label that appears at the left or side of the bottom dividing line of each
layout part. By dragging it up or down, you can use the part label to resize a part. You can also
open the Part Definitions dialog box by double-clicking the label.
P
FILEMAKER PRO SCRIPT STEPS REFERENCE 297
Permitted host
Servers, hosts, websites, services, and so on that are allowed to be connected to.
PHP (PHP: Hypertext Preprocessor)
An open-source programming language primarily used in server-side application software to
create dynamic webpages. FileMaker Server lets you publish data from FileMaker Pro files on
customized webpages created with PHP.
Placeholder text
A type of field label that displays within a field. Placeholder text can be a field name, other text
(such as instructions), or the result of a calculation. In Layout mode, placeholder text is
indicated by a Placeholder Text badge on a field.
Plug-in
Software that extends the capabilities of an application in a specific way.
Popover
A layout object that can contain other layout objects. Popovers include a content area (where
objects are placed) and can include a title. You open a popover by clicking a popover button.
Popovers reposition on the screen as needed to stay in view.
Popover button
A layout object that opens a popover.
Port
A pre-assigned number that indicates a “logical connection place” where a client (such as a web
browser) can connect to a particular server application on a networked computer. Port numbers
range from 0 to 65536. Port 80 is the default port for HTTP services such as FileMaker Pro web
publishing, but you can use another port number if 80 is already in use by another server
application.
Portal
For relational databases, a layout object in one table where you place one or more related fields
to display in rows the data from one or more related records.
Preview mode
The FileMaker mode in which you see how layouts will look when they're printed.
(Use Browse mode to enter and edit your information; use Layout mode to design how your
information is displayed. Use Find mode to find records that match search criteria; use Preview
mode to display how your records will print.)
Primary file
In a FileMaker Pro Advanced runtime solution, the file that connects all of the auxiliary files and
opens when you start the runtime application. From the Developer Utilities in
FileMaker Pro Advanced, you can select a primary file for solutions that have more than one file.
Privilege set
A defined set of permissions that determines a level of access to a file. You can define as many
privilege sets as you like for a file. There are three predefined privilege sets: Full Access, Data
Entry Only, and Read-Only Access.
Problem
In the Script Workspace, an error, omission, or other inaccuracy found in a script.
Q
FILEMAKER PRO SCRIPT STEPS REFERENCE 298
Q
Query
Retrieving, manipulating, or modifying data from a data source by sending SQL statements.
Also, requesting, and then receiving, data from a DBMS. You can also add, edit, format, sort,
and perform calculations on your data using queries.
Quick find
In Browse mode, searches records across multiple fields on a layout.
R
Read-Only Access privilege set
One of the three predefined privilege sets that appear in every file. The Read-Only Access
privilege set allows read access to the records in a file, but not write or design access.
Record
One set of fields in a database table. Each record contains data about a single activity,
individual, subject, or transaction.
Recover
If a file is damaged (for example, from an unexpected quit during a hard-drive update), you can
attempt to recover the file. FileMaker Pro preserves as much data (the file’s schema and
structure and its tables, records, layouts, scripts, and field definitions) as possible.
Recurring import
A method of setting up a file to automatically import read-only data from another file. With
recurring import, imported data refreshes when you open the file, view the layout that contains
the imported data for the first time during a FileMaker Pro session, or run a data update script.
Recursive script
A script that calls itself.
Related field
For relational databases, a field in one table that is related to a field in another table (or to a
different field within the same table). If a relationship is defined between two tables (even
through another table), data in fields in one table can be accessed from the other table.
Related record
A record in the related table whose match field (according to the relationship used) contains a
value that's equal to the value in the match field of another table.
Related table
For relational databases, the table that contains the data you want to access and work with in
the current table. For lookups, the table that contains the data to copy.
Relational database
A group of one or more databases that, when used together, contain all the data you need. Each
occurrence of data is stored in only one table at a time, but can be accessed in any table, either
in the same file or from a related file. Data from another table or file is displayed in the current
table without being copied, and the data changes whenever the values in the other table or file
change.
S
FILEMAKER PRO SCRIPT STEPS REFERENCE 299
Relationship
Relationships provide access to data from one table to another. Relationships can join one
record in one table to one record in another table, one record to many other records, or all
records in one table to all records in another table, depending on the criteria you specify when
you create the relationship in the relationships graph.
Relationships graph
In the Relationships tab of the Manage Database dialog box, you can see the occurrences of
tables both in the current file and from any external, related files. In this relationships graph, you
join tables and change relationships between fields in different tables.
When you create a new table, a visual representation, or occurrence, of the table appears in the
relationships graph. You can specify multiple occurrences (with unique names) of the same
table in order to work with complex relationships in the graph.
Repeating field
A field containing multiple, separate values.
Report layout
A predefined layout type for setting up reports. You can create a layout with simple rows and
columns of data (as in a list), or a complex report with grouped data (subsummary reports). The
fields that you specify appear in columns across the screen or page in one line. Field names are
in the header part and the footer part is blank.
Report with grouped data
A subsummary report that you create using the Report layout type. Reports with grouped data
can include totals and subtotals.
Row
When a layout is viewed in Table View, a row corresponds to a record.
Runtime solution
A solution that does not require FileMaker Pro or FileMaker Pro Advanced in order to be used.
In FileMaker Pro Advanced, use the Developer Utilities to bind a primary file and any auxiliary
files to produce a standalone runtime solution.
S
Schema
In database terminology, a schema is the organization of the tables, the fields in each table, and
the relationships between fields and tables.
Screen stencils
In Layout mode, nonprinting guides that help you design layouts for iPad, iPhone, iPod touch, or
computers with different screen resolutions.
Script
One or more instructions (script steps) that you define to automate repetitive or difficult tasks.
You create and manage scripts using the Script Workspace. You run a script by clicking its
button, choosing its menu command, calling it from another script or a plug-in, or running it at
startup or when a file closes.
Script Debugger
A FileMaker Pro Advanced tool for debugging FileMaker Pro scripts.
Script step
A command that you include in a script.
S
FILEMAKER PRO SCRIPT STEPS REFERENCE 300
Script trigger
A mechanism that causes a specified script to run when a particular event occurs.
Search criteria
In Find mode, the values and operators you specify to locate records. For example, if you type
ABC Travel in the Vendor field, FileMaker Pro looks for and returns all records that have this
name in the Vendor field.
Security
The protection that’s placed on a file. Security includes various types of accounts to
authenticate users, levels of privilege sets to determine what can be done with a file, and
authorization of other files to create references to the current file (including its tables, layouts,
scripts, and value lists). Security also includes extended privileges, which determine the data
sharing options that are permitted by a privilege set.
Segment
A component of a button bar object. Each segment can be defined as a button or popover
button.
Selected tab
In the Script Workspace, the tab that's in the foreground, in which you can create or edit a script.
Self-join
A relationship between fields in the same table. This creates another occurrence of the table in
the relationships graph.
Separator
A line within a menu that separates or groups menu items. A separator can also be the
character used to separate parts of a date, time, or number, or the semicolon (;) used to
separate parameters in a function definition.
Serial number
A unique number entered by FileMaker Pro for each record. You can tell FileMaker Pro to
automatically enter a serial number for each record by setting the Auto-Enter options in the
Options for Field dialog box. You can also serialize records in Browse mode by choosing
Records menu > Replace Field Contents.
Shared file
A file for which sharing has been enabled, which permits users to access the file over a network.
FileMaker Pro, FileMaker Pro Advanced, and FileMaker Server each support one or more of the
following ways to share files: FileMaker Network sharing, which permits multiple FileMaker Pro
or FileMaker Go users to use a file simultaneously; publishing of files to web browser users via
FileMaker WebDirect or Custom Web Publishing; and sharing of data with other applications via
ODBC/JDBC.
Shared ID
In FileMaker Pro Advanced, a case-sensitive ID from 1 to 32 characters long that links
encrypted files in a multifile solution.
Shortcut
Also known as keyboard shortcut. One or more keys that users can press to perform tasks.
Shortcut menu
Use to edit objects or data quickly by choosing commands from a shortcut, or context, menu.
Commands vary depending on the mode you're using, the item the cursor is over, and whether
an item is selected.
To display a shortcut menu, right-click (Windows) or Control-click (OS X) the item.
S
FILEMAKER PRO SCRIPT STEPS REFERENCE 301
Slide control
A layout object made up of one or more slide panels, allowing you to organize fields and other
objects within each slide panel’s borders.
Slide control in Browse mode
Slide panel
A component of a slide control. The slide panel is the area displayed when a dot in a slide
control is selected. You can place objects such as lines, fields, buttons, portals, imported
graphics, blocks of text, tab controls, slide controls, and web viewers on slide panels.
Slider
In the status toolbar, the navigation control for quickly moving to a record in your file based on its
location in the file. In Browse mode, moving the slider changes the current record. In Find mode,
moving the slider changes the current find request. In Layout mode, moving the slider changes
the current layout. In Preview mode, moving the slider changes the current page.
Sliding objects
Objects that move together to close gaps left by entries in adjacent fields.
Set sliding in Layout mode, in the Sliding & Visibility area of the Position tab in the
Inspector.
Snapshot link
A found set of records that is saved in the FileMaker Pro Snapshot Link (FMPSL) format, with
the filename extension .fmpsl. A snapshot link captures and preserves the found set as it was
when you performed the find request. You can also email an FMPSL file to another person.
Solution
A file or a set of files containing database tables, layouts, scripts, and associated data. A
solution solves one or more specific problems, such as tracking customers or invoices.
Sort order
The sequence for rearranging records. Records are sorted by the first field in the sort order list,
then the second, and so on. Values within each field are sorted by the order specified
(ascending, descending, or custom).
Source file
The file from which you bring data during importing or exporting, or the file from which you add a
table to the relationships graph.
Source table
The table upon which one or more table occurrences in the relationships graph are based. The
source table is the table defined in the Tables tab of the Manage Database dialog box.
SQL
A structured programming query language that controls and interacts with a DBMS.
S
FILEMAKER PRO SCRIPT STEPS REFERENCE 302
Stacking order
The order in which objects overlap on a layout. In Layout mode, you can change this order by
cutting and pasting objects or by clicking Arrange buttons in the Arrange & Align area of the
Position tab in the Inspector.
Standard form layout
The default layout, with all fields arranged on separate lines in the order they were defined. The
body part is only as tall as it needs to be to include all the fields in the file. This layout includes
header and footer parts. (In previous versions of FileMaker Pro, a Standard Form layout was a
predefined layout type.)
Starter Solution
A professionally designed FileMaker Pro file customized for managing common business or
personal tasks on iPad, iPhone, desktop, or the web.
Startup script
A script that automatically runs when a file is opened. You can script such things as setting
system formats to the user's formats or setting a file to be shared in a startup script.
You specify a startup script in the File Options dialog box.
Status toolbar
The area across the top of the document window that displays navigation controls, customizable
buttons, and a layout bar for working with layouts. In Layout mode, it includes layout tools.
Status toolbar in Browse mode
Status toolbar in Layout mode
If you don't see the status toolbar, click the status toolbar control at the bottom of the
document window.
Structure
In FileMaker Pro, the organization of file elements such as scripts, layouts, value lists, and
privileges. You interact with a file’s schema through its structure.
Style
A collection of attributes, such as font, color, line style, and text alignment, that determines the
appearance of a layout.
Submenu
A menu that extends from another menu item.
Sub-script
A script that is called from another script.
T
FILEMAKER PRO SCRIPT STEPS REFERENCE 303
Subsummary parts
Use summary parts to view and display information from one or more records. You place a
summary field in a summary part to display a summary of information for each group of records
sorted on the break field. You can add one or more subsummaries above (leading) or below
(trailing) the body.
Subsummary value
Aggregate values for different categories of data within a field. For example, a subsummary
value can be the total of employees for each department.
Summary field
A field that contains the result of a summary calculation of values across a group of records.
Supplemental field
A FileMaker calculation field or summary field that you can append to ODBC tables in order to
do calculations on the external data while working in FileMaker. The calculations are not stored
and you are not changing the schema of the ODBC table.
System formats
Settings that determine how your operating system displays and sorts dates, times, numbers,
and currency.
If the system formats are different on your computer from those on the computer on which the
file was created, the first time you open the file, FileMaker Pro asks if you want to use the
system’s settings or the file’s settings. When you format fields, you can use the Inspector to
have data displayed according to the current system formats.
T
Tab control
A layout object made up of one or more tab panels that allows you to organize fields and other
objects within each tab panel's borders.
Tab control and tab panels in Browse mode
Tab order
The order in which you move from field to field in a record. In Layout mode, you can define a
custom tab order and include buttons, panel controls, and web viewers in the tab order.
Tab panel
A component of a tab control. The tab panel is the area displayed when a tab in a tab control is
selected. You can place objects such as lines, fields, buttons, portals, imported graphics, blocks
of text, tab controls, slide controls, and web viewers on tab panels.
U
FILEMAKER PRO SCRIPT STEPS REFERENCE 304
Table
A collection of data pertaining to a subject, such as customers or stock prices. A database
contains one or more tables, which consist of fields and records. When you create a new table,
a visual representation, or occurrence, of the table appears in the relationships graph. You can
specify multiple table occurrences (with unique names) of the same table in order to work with
complex relationships in the graph.
Table View
Displays multiple records in a tabular format like a spreadsheet. Each record appears in a row,
and each field appears in a column. To select this view, click Table View in the layout bar.
In Browse mode, you can use Table View to create, modify, and delete fields; choose field types;
add, delete, and sort records; or create a chart or dynamic report.
Target file
The file into which you bring data during importing or exporting.
TCP/IP (Transmission Control Protocol/Internet Protocol)
The basic communication protocol that is the foundation of the Internet.
Template
A predefined website that you can select in the Web Viewer Setup dialog box to help you create
a web viewer quickly.
Text baseline
In Layout mode, the guideline that appears at the base of the text in a field or text block. Text
baselines can be solid, dotted, or dashed. If you want text baselines to also appear in Browse
and Find modes, select Text baselines in the Appearance tab in the Inspector.
Text expression
Any expression that returns a text result. For example, a text expression can be a constant
("London"), a field reference (Status), or a calculated value (Rightwords(Lastname;1)).
Timestamp
A field type combining date and time that is compatible with the ODBC requirement for the SQL
format [yyyy.mm.dd hh:mm:ss.sss].
Tooltip
A small box that displays text when a user moves the cursor over a layout object. Tooltips
display in Browse, Find, and Layout modes.
U
Unicode
A worldwide standard that, in one code page, provides a unique number for every character in
human languages, no matter what the platform, software program, or operating system.
Unit of measure
In Browse and Layout modes, you can set the unit of measure to points, inches, or centimeters.
Unstored calculation
A calculation field with a result that is only calculated when the value is needed, for example, to
browse or print. In most cases, FileMaker Pro makes a field stored when you define it, but you
can change the storage type to unstored.
V
FILEMAKER PRO SCRIPT STEPS REFERENCE 305
URL (Uniform Resource Locator)
A web address, which consists of a protocol, a host name, and optionally a port, a directory, and
a filename. For example, http://www.filemaker.com/ , ftp://12.34.56.78:80/myfiles/, or fmp://
mywebsite.com/sample.fmp12.
V
Value list
To save time and ensure accuracy during data entry, define frequently used text, number, date,
or time values as a value list. When you enter data, you can choose from the list of defined
values.
You can format value lists to display in a drop-down list or pop-up menu, or as checkboxes or
option (radio) buttons. The values in a value list can be user-defined or based on the values in a
field in the same file or in a different file. You can also define relationships for use with value
lists, to access and display particular related values. Another option is to use a value list from
another file.
Variable
In a calculation, a symbol or name that represents a value. Use the Set Variable script step to
specify the name, value, and repetition of the variable. Names prefixed by $ are local variables
available only within the current script. Prefix the name with $$ to make the variable available
throughout the current file (global). Local and global variables can have the same name but they
are treated as different variables.
View
An arrangement of your data primarily useful for onscreen manipulation. In Browse mode, Find
mode, or Preview mode, Form View displays individual records, List View displays records in a
list, and Table View displays records in a spreadsheet-like table format.
W, X, Y, Z
Web address
The calculated expression that you enter in the Web Viewer Setup dialog box. A web address is
not equivalent to a URL that a web user could enter in a web browser.
Web browser
An application that you can use to view webpages or websites on the World Wide Web or an
intranet. Browsers download the webpages to the viewer's computer.
Webpage
An HTML document displayed on the Internet or on an intranet.
Web server
A computer that is connected to the Internet or an intranet and has a web server application
installed on it. Web server applications deliver webpages and associated files to web browsers.
Website
One or more webpages connected by links and displayed on the Internet or an intranet.
Web user
Someone using a web browser to access a FileMaker Pro file published on the World Wide Web
or an intranet.
W, X, Y, Z
FILEMAKER PRO SCRIPT STEPS REFERENCE 306
Web viewer
A layout object that allows you to display information from websites based on data in your file.
World Wide Web
An interlinked collection of webpages residing on web servers, and other documents, menus,
and files, which are available via URLs.
X-axis data
In a column, stacked column, line, and area chart, the data series you are comparing (for
example, company name).
In a bar or stacked bar chart, the data series you are measuring (for example, annual sales).
XSLT (Extensible Stylesheet Language Transformations)
XSLT (XSL Transformations) is a subset of XSL (Extensible Stylesheet Language) that is used
to transform, or change, the structure of an XML document into a different document format. For
example, you can use an XSLT style sheet to transform an XML document into an HTML or TXT
document.
XML (Extensible Markup Language)
Instead of being a rigid file format, XML is a language for defining agreed-upon formats that
groups can use for exchanging data. Many organizations and businesses are using XML to
transfer product information, transactions, inventory, and other business data.
FileMaker Pro can export XML data that can then be used, for example, by spreadsheet
applications, data charting applications, and enterprise SQL databases. FileMaker Pro can also
import XML data.
Y-axis data
In a column, stacked column, line, and area chart, the data series you are measuring (for
example, annual sales).
In a bar or stacked bar chart, the data series you are comparing (for example, company name).

Navigation menu