Creating and editing scriptsAfter you have planned your scripts, you are ready to create, edit, and manage them.
1.
• Click between the brackets and edit the calculation, or click to open the Specify Calculation dialog box. Only some calculations are editable inline.
On a blank line, type # or choose Comment from the script steps pane. Using the Comment script step in your script helps others who might want to look at or modify it. Or, choose File menu > Save Script in the Script Workspace window (Windows), or choose Scripts menu > Save Script in the FileMaker Pro menu bar (OS X).
• Right-click the script name and choose Duplicate.
•
• Right-click the script and choose Grant Full Access Privileges. See the notes below for additional information.
•
•
• If a script is open in the script editing pane, you can right-click the script’s tab and choose Select in Scripts Pane to select the script in the scripts pane.
• To edit the color coding of script steps and options in the script editing pane, choose View menu > Syntax Coloring.
• You can also create, edit, duplicate, and delete scripts from the Specify Script dialog box when you create a button or script trigger.
• To edit a script in a new window, right-click a tab in the script editing pane and choose Move Tab to New Window, or click a script name in the scripts pane and choose File menu > Open Script in New Window (Windows) or Scripts menu > Open File in New Window (OS X). The script opens in the Edit Script dialog box. Keep the following in mind:
• To allow the script to do things that normally may not be allowed by the user’s assigned privileges, select Run script with full access privileges.
• Setting a script to run with the full access privileges enables users with limited access and privileges to perform scripted tasks that they would otherwise be unable to perform, such as exporting or deleting records. The access privileges do not change, but the script is allowed more privileges than the user. Furthermore, full access does not carry over to any subsequent sub-script, unless this feature has been enabled in that script as well.
• Scripts can be set to run with full access privileges only by users with the full access privilege set. Only users with full access privileges can edit or delete scripts for which this feature has been enabled.
• If you are using FileMaker Pro Advanced, you can disable script steps so that you can test your script. To disable a script step, select it, then choose Edit menu > Disable (Windows) or Edit menu > Enable/Disable (OS X). Disabled script steps are preceded by “//”. See Disabling script steps (FileMaker Pro Advanced).
• If a script step specifies a field in a tab panel or slide panel that is not the front-most panel, the specified field is selected and the panel it is in 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. Instead, assign an object name to the field and use the Go to Object script step to move to that instance of the field.
• If a script step specifies a field in a popover, the popover opens and the field is selected. If the same field appears elsewhere on the layout and the script finds that field first, the popover 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.