Creating dynamic buttonsBy using scripts and calculations to evaluate the state of button fields, you can make dynamic buttons that change each time they are clicked.
1.
2. Create a field named Icons and choose Container type.
3. Click Create.
4.
5. Select the Use global storage checkbox and type the number of button states for the Maximum number of repetitions, then click OK.
6. Click OK.
7. In Layout mode, add the Icons field to a layout.
8. Click Inspector in the layout bar, then click Data. For Show repetitions, display the maximum number of repetitions for the Icons field. See Setting up the display of repeating fields.
10.
14.
15.
16.
17. Tip To create a button that displays identically across all records, click the Storage tab and select Use global storage. Otherwise, each record will display its own button state.
18.
19. Click OK.
1.
4. For Specify target field, select the Buttons field.
5. For Calculated result, write a Case function that evaluates each GetRepetition test expression for the icon number and increments the number by 1 (replacing the table name “icons” with the table in which you created the Icons field).
1. In Layout mode, select the Buttons field.
2.
3.
4.
5.
6. Click OK.