Creating and editing scripts
After you have planned your scripts, you are ready to create, edit, and manage them using the Manage Scripts feature.
To create a script:
1.
Choose Scripts menu > Manage Scripts. Or, choose File menu > Manage > Scripts.
2.
In the Manage Scripts dialog box, click New, or choose Empty Script from the New list.
The Edit Script window opens. This is where you create scripts or edit existing scripts.
Note  If you choose Default Script from the New list, FileMaker Pro includes default script steps that you can edit or delete in the Edit Script window.
3.
 
Select it from the list of available steps and click Move. Typing the first few letters of the script step scrolls the list to that script step.
A step with square brackets after it has options you can set. Double-click the step, or select it and click Specify. In the next dialog box, specify options, and click OK.
Select it in the list on the right and click Duplicate. To create a duplicate script with the same name as the original, select it in the list and use Shift+Duplicate.
Select it in the list on the right, then choose Edit menu > Copy. Click in the list where you want the script step to appear, and choose Edit menu > Paste. You can also copy and paste script steps into other scripts, copy and paste scripts, or copy and paste into other files. See Copying and pasting scripts.
View available script steps by category or name
Choose All by category, All by name, or a specific category from the View list.
See which script steps are not supported in FileMaker Server schedules and web publishing
Choose an option from the Show Compatibility list:
  •
All displays all script steps available in FileMaker Pro.
  •
Client displays all script steps available in FileMaker Pro.
  •
Server dims script steps that are not supported in a FileMaker Server schedule.
Note  Script steps that are not supported in a FileMaker Server schedule can be run in a file hosted by the server, but are activated on the client side rather than on the server.
  •
Web Publishing dims script steps that are not web-compatible.
Perform the script with full access privileges
Select Run script with full access privileges. See the Note below for additional information.
Select the script to print, and choose File menu > Print. In the Print dialog box, select your options, and click Print.
For information on each script step and its options, see Script steps reference (alphabetical list) and Script steps reference (category list).
4.
When you are finished, close the Edit Script window, then click Save to save it. Or choose Scripts menu > Save Script.
5.
6.
To include the script in the Scripts menu, select Include in menu, or click to the left of the script in the list.
7.
Tips
  •
Use Ctrl+click (Windows) or Command-click (Mac OS) to select multiple script steps. You can add, duplicate, or delete multiple steps.
  •
Add comments to your scripts with the Comment script step. Using comments in your script helps others who might want to look at or modify it.
  •
To edit a script:
1.
Choose Scripts menu > Manage Scripts. Or, choose File menu > Manage > Scripts.
2.
The Edit Script window opens.
Tip  You can open multiple Edit Script windows at the same time. In the Manage Scripts dialog box, use Ctrl+click (Windows) or Command-click (Mac OS) to select non-contiguous scripts, or Shift-click to select contiguous scripts, then click Edit. A separate Edit Script window opens for each script. Double-clicking with multiple scripts selected only opens the script that you clicked. To close all windows, press Alt (Windows) or Option (Mac OS) and click the Close button in any window.
3.
4.
5.
Notes
  •
Use Run script with full access privileges to enable a script to run with the full access privilege set, even if the current user has logged in with a privilege set that does not have full access. Using this feature enables users with limited access and privileges to perform scripted tasks that they would otherwise be unable to execute, such as exporting or deleting records. Access privileges do not change, but the script can do more privileged work for them. Furthermore, full access does not carry over to any subsequent sub-script, unless this feature has been enabled in that script as well.
  •
The Run script with full access privileges feature can only be enabled or modified by users with full access privileges. Therefore, only users with full access privileges can edit or delete scripts for which this feature has been enabled.
  •
The Run script with full access privileges feature only functions in the file in which the script is defined. This command will not override access restrictions on external files. For example, a script to delete records in File A that has the Run script with full access privileges option enabled will not delete records in an access-restricted external file File B.
  •
Users without full access privileges can be given permission to edit scripts that are marked as modifiable in their assigned privilege set. Full access privileges are required to create, duplicate, import, and/or delete scripts.
  •
If you are using FileMaker Pro Advanced, you can disable script steps for testing. To disable a script step, select it, then click Disable. To enable a script step, select it, then click Enable. Disabled script steps are preceded by “//”. For more information, see Disabling script steps (FileMaker Pro Advanced).
  •
If a script step specifies a field in a tab panel that is not in front, the specified field is selected and the tab panel it is in moves to the front of the tab control. If, however, the same field 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.
Related topics 
Script steps reference (category list)
Script steps reference (alphabetical list)
Importing scripts from other FileMaker files
Using buttons with scripts
Working with the Scripts menu
Editing scripts privileges
Publishing databases on the web
Debugging scripts (FileMaker Pro Advanced)
Topics in this section
Managing scripts using folders
Saving a script
Deleting a script
Copying and pasting scripts
Running scripts on FileMaker Server