What is the best way to turn off (i.e. remove from active state) the buttons on a button bar after the button script has been started? For example, I have a button bar on a popover (conveniently placed in the top corner of each layout) that serves as a smart navigation tool. It uses scripts (and script parameters) to open up different types of layouts (the details on the opened layouts depend on the script parameters which correspond to user requests for particular information). When the user then returns to the original layout, the popover is still open, with the previously pressed button still showing the active state, even though that task was completed. The normal, expected behavior is to return the button state to the inactive state and close the popover. Simple, right?
However, this is apparently not a normal property for a button bar in FileMaker, but it should be. If you push a button, and the button-specified task completes (or at least is committed to occur), one's normal expectation is that the button should return to its inactive state, ready to be pushed again, regardless of whether a different or the same task needs to be performed again (e.g. with different script parameters). One does not think of a button as a light switch that stays in either the on or off position. For such a continuously-required function, one would use, well, a light-switch type of control (or selection-type controls like checkboxes for showing which parameters are in current use). That is, one normally thinks of a button as a "toggle" to initiate a script, not as a "switch" that keeps a task continuously working.
Here is the simplest solution I could find after days of perusing this forum and other fora on the internet:
1. In the Button Bar Setup, for the Active Segment setting, Specify "False" instead of the default setting of 'None'. [Huh?? Why??]
2. At the top of the script for every button on the button bar, use the following:
Commit Records/Requests [ Skip data entry validation ; With dialog: Off ; Force Commit ]
Refresh Window [ Flush cached join results ; Flush cached external data ]
The Commit Records step is optional if the user cannot make record modifications on that layout. Oddly, Refresh Window is the only refresh command that works. Refresh Object does not work, either when the object is the popover, the button bar, or an individual button. Huh?? Why??
When will FileMaker get back to optimizing database functionality and user-friendliness instead of focusing on Apple-inspired gussied-up style issues. Now that the shoe looks good, can we please get back to designing it for walking?