FileMaker Pro 12 ® Script Steps Reference
© 2007–2012 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks of FileMaker, Inc. registered in the U.S. and other countries. The file folder logo and the Bento logo are trademarks of FileMaker, Inc. All other trademarks are the property of their respective owners. FileMaker documentation is copyrighted.
Contents About script steps Creating scripts to automate tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Using this script steps reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Learning about scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fields script steps Set Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Set Field By Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Set Next Serial Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Insert Text . . . . . . . . . . . . . . . . . . . . . . . . .
Sort Records by Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Windows script steps New Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Select Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Close Window . . . . . . . . . . . . . . . . . . . . . . . . . . .
Open File Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Open Manage Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Open Manage Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Open Manage Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About script steps 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 scripts that creates a thank you letter to clients in your Client database who have made a purchase in the last week. The script composes a letter tailored to each client.
Script steps reference (alphabetical list) Script steps reference (alphabetical list) A, B, C Add Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Adjust Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Allow Formatting Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Script steps reference (alphabetical list) F Find Matching Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Flush Cache to Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Freeze Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 G Go to Field . . . . . . . . . . . . . . . . . . . . .
Script steps reference (alphabetical list) Open Find/Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Open Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Open Manage Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Open Manage Data Sources . . . . . . . . . . . . . . . . .
Script steps reference (alphabetical list) Set Next Serial Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Set Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Set Use System Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Set Variable . . . . . . . . . . . . . . . . . . . .
Alphabetical headings for script steps reference: A, B, C D E F G H, I, J, K L, M, N O P Q, R S, T U, V, W, X, Y, Z 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.
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.
Perform Script ["Print in Landscape"] #Example 3: This example uses a field value as a parameter Go to Layout ["Detailed Report"] Perform Script [“Find by Salesperson”; Parameter: Sales::Salesperson] Set Field [Sales::Report Title; “Sales by “ & Get (ScriptParameter)] #Example 4: This script uses script parameters to pass text entered by the user to another script, which creates a new account Fields account_name Text Global Storage password Text Global Storage Script: Get New Account Info #Clear the Account
• Select Indefinitely to pause the script until the user clicks Continue (a button created by FileMaker Pro in the status toolbar) or presses Enter. • Select For duration and enter the number of seconds to pause the script. • Select For duration and click Specify to create a calculation to determine the number of seconds to pause the script.
Pause/Resume Script [Duration (seconds): 3] Go to Layout ["Data Entry"] Tip You can create a button with the Resume step to allow the user to resume a script if it's paused. Related topics Script steps reference (alphabetical list) Contents Exit Script Purpose Forces sub-scripts or external scripts to stop immediately and return to the main script, with or without an optional script result.
Go to Layout ["List View"] #Find records for California mailing sub-script Perform Find [Restore] If [Get (ScriptResult)=0] Show All Records Go to Layout ["Data Entry"] Exit Script Else Print [] End If #Example 2: Assign Letter Grade If [Get(ScriptParameter) >= 90] Exit Script[Result: "A")] Else If [Get(ScriptParameter) >= 80] Exit Script[Result: "B"] Else If [Get(ScriptParameter) >= 70] Exit Script[Result: "C"] Else If [Get(ScriptParameter) >= 60] Exit Script[Result: "D"] Else Exit Script[Result: "F"] End
Where the script step runs Supported Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description While pressing Esc will also halt a script, Halt Script is useful if you are also using the Allow User Abort script step to disable the Esc key. Halt Script stops the script when Allow User Abort is set to Off. Examples You can use the Halt Script script step with the Show Custom Dialog script step to present a user with options.
Where the script step runs Supported FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Must follow an If step or another Else If step; it can’t follow an Else script step. When an If script step calculation evaluates to True (not zero), FileMaker Pro performs the steps that are indented under it.
Else Purpose Performs one set of steps if a calculation is True (not zero), and another set of steps if the calculation is False (zero). Format Else Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Use with the If script step.
End If Purpose Marks the end of an If script step structure. Format End If Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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.
Loop Purpose Repeats a set of script steps. Format Loop Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description This script step and the End Loop script step mark the beginning and end of a repeating structure of script steps.
Related topics Script steps reference (alphabetical list) Contents Exit Loop If Purpose Exits a loop if the specified calculation is True (not zero). Format Exit Loop If [] Options Click Specify to define the Boolean calculation. In the Specify Calculation dialog box, type the calculation you want evaluated, or use the field list (on the left) and the functions list (on the right) with the mathematical and text operators to build the calculation.
Show All Records Sort Records[Restore; No dialog] Set Field [Table1::Count; 1] Loop Set Field [Table1::Bonus; Table1::Salary * .25] Go to Record/Request/Page[Next] Exit Loop If [Table1::Count = 10] Set Field [Table1::Count; Table1::Count + 1] End Loop Related topics Script steps reference (alphabetical list) Contents End Loop Purpose Marks the end of a Loop script structure. Format End Loop Options None.
Examples Go to Record/Request/Page[First] Loop Set Field [Table1::Salary; Table1::Salary * 1.1] Go to Record/Request/Page[Exit after last; Next] End Loop Related topics Loop script step Exit Loop If script step Script steps reference (alphabetical list) Contents Allow User Abort Purpose Allows users to stop a script if set to On (default), or prevents users from stopping a script if set to Off.
Allow User Abort script step and set it to Off. FileMaker Pro automatically turns Allow User Abort on after the script finishes running. Examples To set up a kiosk solution, use: Allow User Abort[Off] Then, create the rest of the script as a looping script that never ends. Use the Allow User Abort script step as the first step to prevent people from closing the file or exiting the application.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Use this script step to handle errors in a manner consistent with the functions the script performs. By using the Get(LastError) function immediately after a script step, you can verify that the step was performed properly.
Format Set Variable [ {[]}; Value:] Options Click Specify to set the variable 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.
Set Variable [$$bonus[2]; Value:3 * 4] Related topics Script steps reference (alphabetical list) Contents Install OnTimer Script Purpose Runs a specified script at the specified interval. Installs a single timer per window. After the specified interval has passed, the next time the application is idle, runs the specified script.
Install OnTimer Script [“MyScript”; Interval: 600] Related topics Script steps reference (alphabetical list) Contents FILEMAKER SCRIPT STEPS REFERENCE 31
Navigation script steps Navigation script steps move to different areas of a database.
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.
• 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 lets you create a calculation to determine the index number for the desired record, find request, or page in Preview mode. Note Exit after last will exit a loop but does not stop or exit a script.
Manage Database displays the Manage Database dialog box, where you can create or edit relationships. • Show record using layout lets you choose a 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.
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.
Format Go to Portal Row [Select; ] Options Specify lets you choose from the following options. • 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 loop or the enclosing script. • Next moves to the next row in the portal. Exit after last tells FileMaker Pro to exit the loop or the enclosing script.
Related topics Script steps reference (alphabetical list) Contents Go to Object Purpose Moves to the specified object on the current layout. Format Go to Object [Object Name: "
Go to Object [Object Name: "Launch button"] The following example navigates to the repetition (2) of a field named "Value": Go to Object [Object Name: "Value"; Repetition: 2] The following example navigates to an object whose name is the current day of the week: Go to Object [Object Name: DayName (Get(CurrentDate))] Related topics Script steps reference (alphabetical list) Contents Go to Field Purpose Moves to the specified field on the current layout.
appears elsewhere on the layout and the script finds that field first, the tab panel with that same field will not come forward. Instead, assign an object name to the field and use the Go to Object script step to move to that instance of the field.
Examples Go to Layout ["Layout #2"] Go to Record/Request/Page [First] Go to Field [Table1::First Name] Pause/Resume Script [Indefinitely] Go to Next Field Go to Record/Request/Page [Next] Related topics Script steps reference (alphabetical list) Contents 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.
Pause/Resume Script [Indefinitely] Go to Previous Field Related topics Script steps reference (alphabetical list) Contents Enter Browse Mode Purpose Switches to Browse mode, where you can enter or edit data. Format Enter Browse Mode [Pause] Options Pause temporarily stops the script so the user can enter data.
Enter Find Mode Purpose Switches to Find mode, where you can search for sets of records. Format Enter Find Mode [Restore; Pause] Options • Pause temporarily stops the script to allow the user to enter a find request. • Specify find requests allows you to create and edit requests for use with this script step.
Enter Preview Mode Purpose Switches to Preview mode, where you can see how records, forms, or reports will look when they're printed. Format Enter Preview Mode [Pause] Options Pause temporarily stops the script to allow you to examine the preview result before proceeding with the next step in the script.
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. 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.
Cut Purpose Deletes the contents of the specified field in the current record and saves the contents to the Clipboard. Format Cut [Select; ] Options • Select entire contents deletes the contents of a field 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. • Select Go to target field or click Specify to select the field whose contents you want to cut.
Copy Purpose Copies the contents of the specified field in the current record and saves them to the Clipboard. Format Copy [Select; ] Options • Select entire contents copies the entire contents of a field to the Clipboard. If you do not use Select entire contents, only the selected portion of the field's data is copied. • Select Go to target field or click Specify to select the field whose contents you want to copy.
Paste Purpose Pastes the contents of the Clipboard into the specified field in the current record. Format Paste [Select; No style; ] 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.
Contents Clear Purpose Deletes the contents of the specified field in the current record. Format Clear [Select; ] 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. • Select Go to target field or click Specify to specify the field whose contents you want to delete.
Related topics Script steps reference (alphabetical list) Contents Set Selection Purpose Allows the user to specify the starting and ending position of a selection in a field. Format Set Selection [; Start Position: ; End Position: ] Options • Select Go to target field or click Specify to specify the field whose contents you want to select.
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.
Go to Field [Performance Review] Paste [] Related topics Script steps reference (alphabetical list) Contents Perform Find/Replace Purpose Finds/replaces data according to the options in the Specify Find/Replace dialog box. Format Perform Find/Replace [No dialog; “”; ””; Find Next/Replace & Find/Replace/Replace All] Options • Perform without dialog prevents display of the Find/Replace Summary dialog box at the end of the find/replace operation.
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 Set Field Purpose Replaces the entire contents of the specified field in the current record with the result of a calculation.
• 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.
Where the script step runs Supported Runtime solution Yes 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. 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.
In this example, Table1::FullName contains the literal value “Table1::FullName” and Table2::Name contains “John Smith”. After the step completes, the value in “Table1::FullName” is “John Smith”. Set Field By Name[“Table1::FullName”;Table2::Name] Note The context for the calculation (determined in the upper left corner of the Specify Calculation dialog box) is essential for proper evaluation.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Allows you to use the Manage Scripts feature to update the value. 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.
Insert Text Purpose Pastes a text value into a field in the current record. Format Insert Text [Select; ; “”] 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. • Select Go to target field or click Specify to specify 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.
Examples Insert Text [Select; Table1::LastName; "Smith"] Related topics Script steps reference (alphabetical list) Contents Insert Calculated Result Purpose Pastes the result of a calculation into the current field in the current record. Format Insert Calculated Result [Select; ; ] Options • Select entire contents replaces the contents of a field.
Examples The following script switches to a specific layout, pastes the current user name, then switches to a different layout. Note that Insert Calculated Result only works when the field is on the active layout. Go to Layout ["User Name Layout"] Insert Calculated Result [Table1::UserNameField; Get(AccountName)] Go to Layout ["Layout Number based on User Name"] Related topics Script steps reference (alphabetical list) Contents Insert From Index Purpose Pastes a value from the index into a field.
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).
Where the script step runs Supported Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 12.0 Description Insert From URL supports http, https, ftp, ftps, and file protocols. FileMaker Pro downloads the resource that is specified by the URL to the target field. Note Be aware that there are possible security issues with using https and ftps.
Format Insert Current Date [Select; ] 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. • Select Go to target field or click Specify to specify the field to paste the date into.
Format Insert Current Time [Select; ] 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. • Select Go to target field or click Specify to specify the field to paste into.
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. • Select Go to target field or click Specify to specify the field to paste into.
Options • Store only 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. • Select Specify source file or click Specify to identify the file that contains the graphic. For more information on creating file paths in FileMaker Pro, see Creating file paths.
Insert QuickTime Purpose Imports a QuickTime movie or sound file into the current container field. Format Insert QuickTime [“”] Options Select Specify source file or click Specify to display the Open dialog box where you can specify the name, file type, and location of the QuickTime file you intend to insert. For more information, see Creating file paths.
Related topics Script steps reference (alphabetical list) Contents Insert Audio/Video Purpose Imports an audio or video file, or a reference to an audio or video file, into the current interactive container. Format Insert Audio/Video [Reference;“”] Options • Select Store only a reference to have FileMaker Pro store only a link to an audio or video file in the container field instead of the actual file.
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. Examples Insert Audio/Video [“Site_music.
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 • 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.
Where the script step runs Supported FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
• 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.
Replace Field Contents [No dialog; script examples::Serial Number; Serial numbers] Related topics Script steps reference (alphabetical list) Contents Relookup Field Contents Purpose Copies new values from the lookup source field into the records that make up the current found set. Format Relookup Field Contents [No dialog; ] Options • Perform without dialog prevents a dialog box from displaying when the script step executes that lets the user confirm field information.
• 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. For example, if a field value is modified and a relookup is attempted before the data is committed, then the relookup search will be based on the old data rather than the modified data. (For more information about committing data, see Committing data in records.
Originated in FileMaker Pro 6.0 or earlier Examples Go to Layout [Images::Nature Scenes] Export Field Contents [Images::Original Pictures;”Uncropped.
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 New Record/Request Purpose In Browse mode, creates a new, blank record. In Find mode, creates a new find request. Format New Record/Request Options None.
Duplicate Record/Request Purpose In Browse mode, makes a duplicate of the current record. In Find mode, duplicates the current find request. Format Duplicate Record/Request Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.
Delete Record/Request Purpose In Browse mode, deletes the current record. In Find mode, deletes the current find request. Format Delete Record/Request [No dialog] Options Perform without dialog prevents the deletion confirmation dialog box from displaying when the script step executes.
Examples Perform Find [Restore] Omit Delete Record/Request [ ] Related topics Script steps reference (alphabetical list) Contents Delete Portal Row Purpose Deletes the selected portal row (which deletes data in a related record). Format Delete Portal Row [No dialog] Options Perform without dialog prevents a message box from displaying when the script step executes that asks the user to confirm the deletion of the portal row.
Go to Portal Row [First] Delete Portal Row [No dialog] Related topics Script steps reference (alphabetical list) Contents Delete All Records Purpose Deletes all the records in the current found set. Format Delete All Records [No dialog] Options Perform without dialog prevents a message box from displaying when the script step executes that asks the user to confirm the deletion of records.
Related topics Script steps reference (alphabetical list) Contents Open Record/Request Purpose Makes an existing record or find request available for editing. Format Open Record/Request Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.
Examples Perform Find [Restore] Go to Record/Request/Page [Last] If [IsEmpty(script examples::Field1)] Open Record/Request End If Related topics Script steps reference (alphabetical list) Contents Revert Record/Request Purpose Returns the current record or request to the way it was before you began adding or changing data in the record.
Commit Records/Requests Else Revert Record/Request [No dialog] End If Related topics Script steps reference (alphabetical list) Contents Commit Records/Requests Purpose Commits a record. Format Commit Records/Requests [Skip data entry validation; No dialog; Force Commit] Options Skip data entry validation overrides any data entry validation options set for fields and commits the record anyway.
Description This script step exits the current record or find request, updating field data and making no field active. Examples Show Custom Dialog ["Commit record or revert changes?"; "Click 'Commit' to save your changes, or 'Revert' to discard changes to this record.
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.) Note 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.
Where the script step runs Supported Instant Web Publishing Yes Runtime solution Yes 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 while holding down the Shift key (Windows) or Option key (Mac OS) when there is no active field.
Options • Perform without dialog prevents display of import-related dialog boxes when the script step executes. However, if a data source file has not been specified, the Open File dialog box will be displayed when a script is run from FileMaker Pro. • Specify data source lets you choose the file or source of the data to be imported.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Partial FileMaker Go Partial Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
/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>/ ) is evaluated as being relative to the temporary path. • Any paths that include “..” are considered invalid.
Format Export records [No dialog; “
When you include this script step in a FileMaker Server scheduled script and you do not select Perform without dialog in the Edit Script dialog box, the text (NOT compatible) appears after the script step. The script, however, will run. The behavior will be the same as if Perform without dialog was selected. See Get(DocumentsPathListing) funciton for more information.
Save Records As Excel Purpose Saves records to a specified Excel worksheet. Format Save Records As Excel [Restore; No dialog; “
Examples Go to Layout ["Layout #4"] Save Records As Excel [No dialog; "Contacts.xls"] Related topics Export Records script step Import Records script step Script steps reference (alphabetical list) Contents Save Records As PDF Purpose Saves records to a specified PDF file.
• In the Initial View tab, you can define the initial view for the layout and magnification for the PDF file. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 8.0 Description This script step operates in all modes except Find mode. Note Mac OS: Save Records As PDF is not supported in runtime solutions.
• Select Specify output file or click Specify to display the Specify Output File dialog box, and enter the path of the snapshot link. Click Add File and choose the folder to save the file to, or type the path directly in the list. 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.
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 Perform Find Purpose Enters Find mode and finds records that match one or more find requests that you set up, that are stored with the script step.
• 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.
Extend Found Set script step Script steps reference (alphabetical list) Contents Perform Quick Find Purpose Finds records that match one or more search words based on text that you specify or text returned by a calculation formula. Format Perform Quick Find [] Options Click Specify to specify the search text in the Specify Calculation dialog box. Type the search text in quotation marks or use a calculation function that returns the text to use for the search.
Perform Quick Find[$query] End If Related topics Script steps reference (alphabetical list) Contents Find Matching Records Purpose Finds records based on the context of a specified field. Format Find Matching Records[Replace/Constrain/Extend; ] Options Select Specify target field or click Specify, select a field or specify a calculation indicating the field you want to search by, and click OK.
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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description This script step is equivalent to a logical AND search. Note If no records match the find criteria, this script step returns a found set of zero records.
Where the script step runs Supported FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description This script step is equivalent to a logical OR search. Examples Go to Layout ["Data entry"] Extend Found Set [Restore] Sort Records [Restore; No dialog] Related topics Script steps reference (alphabetical list) Contents Modify Last Find Purpose Changes the most recent find request.
Originated in FileMaker Pro 6.0 or earlier Description Add a Perform Find script step after this script step to find records.
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.
Examples Show All Records Omit Record Show Omitted Only Enter Preview Mode [Pause] Related topics Script steps reference (alphabetical list) Contents Omit Record Purpose Omits the current record from the found set and places you on the next record in the table. Format Omit Record Options None.
Show Omitted Enter Preview Mode [Pause] Related topics Script steps reference (alphabetical list) Contents Omit Multiple Records Purpose Omits several records from the found set, starting with the current record, and places you on the next record in the table. Format Omit Multiple Records [No dialog; ] Options • Perform without dialog prevents a dialog box from displaying when the script step executes; the dialog lets the user enter the number of records to be omitted.
Examples Perform Find [Restore] Omit Multiple Records [No Dialog, 3] Related topics Script steps reference (alphabetical list) Contents Sort Records Purpose Sorts the records in the current found set according to specified criteria. Format Sort Records [Restore; No dialog] Options • Perform without dialog prevents display of a dialog box when the script step executes that lets the user enter a different set of sort instructions.
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. Note Items in the sort order that aren’t valid when the script step is performed are ignored.
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. Notes • You don't need to perform an Unsort Records script step before executing a Sort Records script step. • You can place a Go To Object script step before the Sort Records by Field script step to ensure Sort Records by Field acts upon the correct table occurrence.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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.
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 New Window Purpose Creates a new window based on the foreground window.
Note If you clear the Specify Advanced Style checkbox, you will lose any advanced style settings that have been created. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Partial Custom Web Publishing Partial Instant Web Publishing Partial Runtime solution Yes Originated in FileMaker Pro 6.
• No Kiosk properties apply to dialog windows opened in Kiosk mode. For example, the status toolbar shows. • When multiple Kiosk and non-Kiosk files are open, if a non-kiosk file opens a new dialog window, the user can’t switch to other windows (including a window created in Kiosk mode) Examples The following examples create a new document or dialog window based on the Data Entry layout.
Where the script step runs Supported FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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.
Format Close Window [Current window or Name: ; Current file] Options • Click Specify to select which window you want FileMaker Pro to close. You can enter literal text or click Specify to generate a name from a calculation. • Select Current file only to restrict matches to the current file (not selecting this option matches all available FileMaker Pro files). Note Closing the last window of a file closes the file and halts execution of the current script.
Options Use Specify to choose an adjustment option. • Resize to fit resizes the window to the minimum size possible while keeping all items in the layout visible. • Maximize resizes the window to full-screen size. • Minimize reduces the window to an icon on the status bar (Windows) or Dock (Mac OS) • Restore returns the window to its previous size. • Hide hides the current database window from view.
• Current Window selects the current foreground window when the script step is performed. • Window Name selects an open window by name. You can enter literal text or click Specify to create a window name from a calculation. • Select Current file only to restrict matches to the current file (not selecting this option matches all available FileMaker Pro files). • Height is the height of the adjusted window in pixels. You can enter a number or click Specify to generate a number from a calculation.
• 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.
Where the script step runs Supported Runtime solution Yes 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.
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. A Pause/Resume script step unfreezes a Freeze Window script step. Notes • 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description 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.
• To Selection brings the current field into view (similar to tabbing into a field). Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Examples Go to Record/Request/Page [First] Loop Set Field [Table1::Salary; Table1::Salary * 1.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing No Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Examples Go to Layout ["Contacts"] Show/Hide Toolbars [Hide] Related topics Script steps reference (alphabetical list) Contents Show/Hide Text Ruler Purpose Shows or hides the text ruler.
Where the script step runs Supported Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Choosing the Toggle option switches the current state of the ruler. The Text Ruler is used to format paragraphs and tabs within fields and on layouts. Examples Go to Layout ["Notes"] Toggle Text Ruler [Show] Related topics Script steps reference (alphabetical list) Contents Set Window Title Purpose Changes the title of a window.
Where the script step runs Supported Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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. Examples Perform Find [Restore] Set Window Title [Current Window; New Title: “Find Results”] Related topics Script steps reference (alphabetical list) Contents Set Zoom Level Purpose Enlarges or reduces the image on the screen.
Where the script step runs Supported FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Examples Go to Layout ["Data entry"] Set Zoom Level [Lock; 100%] Related topics Script steps reference (alphabetical list) Contents View As Purpose Displays data in the specified format.
Where the script step runs Supported Runtime solution Yes 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.
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 New File Purpose Allows the user to create a new database file. Format New File Options None.
Examples New File Related topics Script steps reference (alphabetical list) Contents Open File Purpose Opens the specified FileMaker file or allows the user to select a file to open. Format Open File [Open hidden; “”] Options • Open hidden causes FileMaker Pro to open and hide the specified database. • Specify lets you select a FileMaker Pro database or ODBC data source to open. Choose Add FileMaker Data Source or Add ODBC Data Source to locate and select a file.
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.
Where the script step runs Supported Instant Web Publishing No Runtime solution Yes 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 database that the script is running from. This script step disconnects the specified ODBC data source. This enables you to “re-login” to the specified ODBC data source with a different user name and password, without closing the FileMaker file.
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.
Related topics Script steps reference (alphabetical list) Contents Set Multi-User Purpose Allows or disallows network access to a database. Format Set Multi-User [On/On (Hidden)/Off] Options • Select On to allow network access via FileMaker Network Sharing. This is the same as selecting All Users in the FileMaker Network Settings dialog box. • Select On (Hidden) to allow network access but prevent the name of the shared database from appearing in the Open Remote File dialog box.
Set Multi-User [On] End If Tip The Get(MultiUserState) function could be used to verify the resulting multi-user setting. Get(MultiUserState) is set to 0 for a single-user file and 1 for a multi-user file. Related topics Script steps reference (alphabetical list) Contents Set Use System Formats Purpose Allows the user to choose between the formats stored with the file or the user's current system formats.
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. Examples This script could be a startup script that checks the system language before using system formats.
Description Use this script step to back up your database. 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 copy(single file). Container objects will be embedded in the copy. Examples Save a Copy as ["backup"] Related topics Script steps reference (alphabetical list) Contents Recover File Purpose Recovers a damaged FileMaker Pro file.
Originated in FileMaker Pro 6.0 or earlier Description FileMaker Pro attempts to repair and 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. Examples #Note: The Recover command makes an aggressive attempt to reopen a damaged file.
Where the script step runs Supported Runtime solution Yes 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
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).
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description • You must specify an existing account. • You must be assigned the Full Access privilege set to perform this script step.
• New Password is the new password for this account. You can enter literal text or click Specify to create a new password from a calculation. • User must change password on next login When selected, this option forces users to change their password the next time they log in to the database.
Options Click Specify to display the “Change Password” Options dialog box, where you can set the following options. • Old Password is the old password for the current account. You can enter literal text or click Specify to generate the password from a calculation. • New Password is the new password for the current account. You can enter literal text or click Specify to create a new password from a calculation.
Change Password [] End If Related topics Script steps reference (alphabetical list) Contents Enable Account Purpose Enables or disables a specific account. Format Enable Account [Account Name: ; Activate/Deactivate] Options Click Specify to display the “Enable Account” Options dialog box, where you can set the following options. • Account Name is the name of the account to be activated or deactivated.
Examples Enable Account [Account Name:"MyAccount"; Activate] Related topics Script steps reference (alphabetical list) Contents Re-Login Purpose Allows the user to log in to the database using a different account and password without closing and reopening the file. Format Re-Login [Account Name: ; Password: ; No dialog] Options Perform without dialog prevents the Open dialog box from displaying when the script step executes.
Description Privileges assigned to the new account take effect immediately, including access to tables, records, layouts, scripts, and value lists. 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.
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 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.
Contents Check Record Purpose Uses the spelling checker to check the contents of every field in the current record. Format Check Record Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.
Format Check Found Set Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.
Where the script step runs Supported FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Where the script step runs Supported Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
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.
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. Examples The following script displays a message box that asks if the user wants to open the Edit Saved Finds dialog box, and opens it if the response is Yes.
Description This script step is the same as choosing Edit menu > Preferences (Windows) or FileMaker Pro menu > Preferences (Mac OS). Use this script step to open the Preferences dialog box for users if you have restricted their access to FileMaker Pro menus. Examples The following script displays a message box that asks if the user wants to open the Preferences dialog box, and opens it if the response is Yes.
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. Examples The following script displays a message box that asks if the user wants to open the File Options dialog box, and opens it if the response is Yes.
Description This script step is the same as choosing File menu > Manage > Containers. Notes • The user’s account must be assigned the Full Access privilege set, or this script step will not be performed. (Select Run script with full access privileges to enable the script for all users.) • See Sharing databases on a network for information about making schema changes to shared databases.
Where the script step runs Supported Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Manage > Database. Notes • The user’s account must be assigned the Full Access privilege set, or this script step will not be performed. (Select Run script with full access privileges to enable the script for all users.) • See Sharing databases on a network for information about making schema changes to shared databases.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Manage > External Data Sources. Notes • The user’s account must be assigned the Full Access privilege set, or this script step will not be performed.
Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution No 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.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing Scripts menu > Manage Scripts, or File menu > Manage > Scripts. Note Once an Open Manage Scripts step is performed, FileMaker Pro halts execution of the current script.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution No 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.
Format Open Find/Replace Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Format Open Help Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing Help menu > FileMaker Pro Help.
Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Open Remote. The Open Remote dialog box allows you to select and open a shared FileMaker Pro database over a network connection.
Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution No Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Sharing > FileMaker Network. Use this script step to open the FileMaker Network Settings dialog box for users if you have restricted their access to FileMaker Pro menus.
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 Tip Use the Comment script step to annotate y
• Use Label to specify 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. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.
• 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. Example 1 The following performs a search using a custom dialog box. The dialog box asks users to enter a customer name and city.
Format Allow Formatting Bar [] 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.
Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Examples Set Error Capture [On] Perform Find [Restore] If [Get (LastError) <> 0] Beep Show Custom Dialog ["Couldn't find the record...
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Options • Perform without dialog prevents the Dial Phone dialog box from displaying when the script step executes. • Click Specify to display the “Dial Phone” Options dialog box where you can set the following options. • Phone Number lets you enter a phone number to dial. • Specify lets you create a calculation to generate the phone number. • Use Dialing Preferences (if NDISWAN TAPI is not installed) tells FileMaker Pro to use the current phone dialing preferences, based on your location.
Dial Phone [No dialog; 411] Related topics Script steps reference (alphabetical list) Contents Install Plug-In File Purpose Installs or updates a plug-in file from a container field onto your computer. Format Install Plug-In File[] Options Select Specify target field or click Specify 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.
On this operating system Plug-ins are installed in this folder: Windows Vista C:\users\user_name\AppData\Local\FileMaker\Extensions\ or Windows 7 Mac OS X Macintosh HD/Users/user_name/Library/Application Support/FileMaker/Extensions 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. Plug-in files have the extension .fmx (Windows) or .fmplugin (Mac OS). Compressed plug-in files in .
Options 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.
• 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.
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. Examples The following example resets the web viewer named “Web Viewer 1” to its originally specified web address: Set Web Viewer [Object Name: "Web Viewer 1"; Action: Reset] The following example displays the FileMaker, Inc.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing Partial Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description Windows: Open URL supports http, https, ldap, ldaps, ftp, file, and mailto URL types. For example, if the URL starts with http, FileMaker Pro opens the user's web browser and processes the URL.
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. Related topics Script steps reference (alphabetical list) Contents Send Mail Purpose Sends an intranet or internet email message (with or without a file attachment) to one or more recipients. Email can be sent through an email application or via SMTP (Simple Mail Transfer Protocol, a set of criteria for sending and receiving email).
• 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) • 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.
• The Send Mail script step does not control the font’s appearance. Use the email client to make any changes to the font. Examples Perform Find [Restore] Send Mail [To: script examples::Field1; Subject: "This is a test email"; Message: "Hello, world." ] Send Mail [Send via SMTP Server; To: "Inventors SIG"; Subject: "New Member Greetings"; Message: "Welcome to our group.
Where the script step runs Supported Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description • 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 a Mac OS based computer, the script step is ignored. (An error code is generated, which can be captured with the Get(LastError) function.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes 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.
Related topics Script steps reference (alphabetical list) Contents Execute SQL Purpose Executes any SQL statement on an ODBC data source. Format Execute SQL [No Dialog; ODBC: ; ] Options • Perform without dialog prevents the Specify SQL dialog box, the Select ODBC Data Source dialog box, and the Password dialog box from displaying when the script step executes. • Click Specify to display the Specify SQL dialog box, where you can set the following options.
Important See Get functions for information about error handling. • Get(LastODBCError) function returns the latest error state returned by ODBC. • Get(LastError) function returns the last FileMaker Pro error. Notes • SQL statements are limited to a maximum length of 256 K characters (512 KB). • 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.
Format Send Event [""; ""; "", ""] Options Click Specify to display the “Send Event” Options dialog box, where you can set the following options. • Send the 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.
Originated in FileMaker Pro 6.0 or earlier Description Select the event you want to send in the “Send Event” Options dialog box. • 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. • Each Send Event script step sends one event. You can include more than one Send Event in a script.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go No Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description For additional scripting capabilities, you can create a program in Basic or C and run that program with this script step.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Yes Custom Web Publishing Yes Instant Web Publishing Yes Runtime solution Yes 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. Note Comments print in italics.
Options None. Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script No FileMaker Go Yes Custom Web Publishing No Instant Web Publishing No Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description This operation is normally done periodically during idle time and after extensive structural changes, such as converting files and defining fields.
Compatibility Where the script step runs Supported FileMaker Pro Yes FileMaker Server scheduled script Yes FileMaker Go Partial Custom Web Publishing No Instant Web Publishing Yes Runtime solution Yes Originated in FileMaker Pro 6.0 or earlier Description If this script step is associated with a button and if the file is accessed through the web, performing the script will log out the current web session.