Creating dynamic buttons (FileMaker Pro Advanced)By 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.
4. Select the Use global storage checkbox and type the number of button states for the Maximum number of repetitions.
5. Click OK.
6.
7.
8. Create a field named Buttons and choose Container type.
9.
10.
11. Click OK.
1.
3. Add a Set Field script step.
4.
5. Double-click Buttons.
6.
7. Write a Case function that evaluates each GetRepetition test expression for the icon number and increments the number by 1.icons::Buttons = GetRepetition (icons::Icons; 1); GetRepetition (icons::Icons; 2);icons::Buttons = GetRepetition (icons::Icons; 2); GetRepetition (icons::Icons; 3);icons::Buttons = GetRepetition (icons::Icons; 3); GetRepetition (icons::Icons; 4);icons::Buttons = GetRepetition (icons::Icons; 4); GetRepetition (icons::Icons; 5);
8. Click OK.
1.
2.
3.
4.
5. Click OK.You can switch to Browse mode and test your dynamic button. For more information about using buttons with scripts, see Using buttons with scripts.Note FileMaker Pro Advanced may not be available in all of the shipping languages of FileMaker Pro.