Defining or changing a button
When you define a button, you can add a text label, an icon, or text and an icon, then assign a single command or a script to perform.
Another type of button that you can create is a popover button, which displays a popover. See Working with popovers on layouts.
To define or change a button:
1.
See Creating and editing scripts.
2.
In Layout mode, from the Layout pop-up menu, choose the layout for the button. Then:
 •
 •
3.
 
In the status toolbar, do the following.
 •
Windows: Click the arrow next to the Button tool Button tool in status toolbar in Windows or the Popover Button tool Popover Button tool in status toolbar in Windows, and choose Button from the menu, then drag the crosshair to draw the button.
 •
OS X: Click and hold the Button tool Button tool in status toolbar in OS X or the Popover Button tool Popover Button tool in status toolbar in OS X, and choose Button from the menu, then drag the crosshair to draw the button.
Tip  You can also choose Insert menu > Button or Popover Button.
Select the object(s) and choose Format menu > Button Setup.
If you attached a button definition to an existing object, you can only use an action for the button, so skip to step 5.
4.
By default, FileMaker Pro creates a label of text only, center aligned.
 
To use a custom icon, click +. Choose a filename (in .png or .svg format), then click Open (Windows) or Insert (OS X). For more information about SVG support, see FileMaker Pro SVG Grammar for Button Icons.
To remove a custom icon from the list of choices in this file, select the icon, then click . The icon is removed from the list, but buttons or popover buttons that use the removed icon don't change.
5.
For Action, choose what you want the button to do.
 
Do Nothing (the default). You can also choose this option to disable a button.
Single Step. In the Button Action dialog box, select and define a script step, then click OK.
To save the action as a script, click Convert to Script. Enter a name for the script, then click Save (Windows) or OK (OS X). FileMaker Pro saves the script in the Script Workspace window. See Creating and editing scripts.
Note  Select Run script with full access privileges to allow the script to do things that normally may not be allowed by the user’s assigned privileges.
Perform Script. Choose a script in the Specify Script dialog box, then click OK. (You can choose only one script for each button.) See Specify Script dialog box. To define a script, see Creating and editing scripts.
6.
7.
Notes
 •
 •
You can assign a script trigger to a button. In Layout mode, select the button, then choose Format menu > Set Script Triggers. A badge Layout trigger badge on a layout appears on a button on which you’ve set a script trigger.
 •
 •
 •
Perform Script is useful if you want to run sub-scripts. You can choose to pause, resume, exit, or halt any script that is currently running when a user clicks the button.
 •
Pause (the default): A paused script remains paused.
 •
Resume: A paused script will be resumed after the button’s script executes.
 •
Exit: A current paused script is exited. If the current script was called by another script, control returns to the original script.
 •
Halt: Execution of all scripts (except the button’s script) is halted.
 •
Related topics 
Script steps reference (category list)
Script steps reference (alphabetical list)
Formatting buttons, popover buttons, and popovers
Defining or changing a button bar