Reputation: 375475
I have a button to go to layout
"search", currently it moves to layout "search" in Browse Mode. Can I force my button to move to this layout in Find Mode?
Upvotes: 1
Views: 1964
Reputation: 66
It looks like you've set your button to perform a single script step "Go to Layout". You'll need to change this so that clicking your button performs a script instead. The script will take you to the search layout and change the mode to Find Mode.
Open ScriptMaker or Scripts -> Manage Scripts, and create a new script. The new script should have two script steps: (1) Go to Layout ["Search"(Search_TO)] and (2) Enter Find Mode []. Save the script, then assign the new script to the button.
(Note: Search_TO is the Table Occurrence on which you have based your "Search" layout; FileMaker will automatically put this in for you when you select the Search layout from the Manage Layouts window. You don't have to type it in.)
Do this by going to Layout Mode, double clicking the button and choosing Format -> Button Setup. Change the button from "Go to Layout" to Perform Script, and choose the new script you just created.
There are other ways of achieving the same result, e.g., setting a Script Trigger to change the Mode when the layout opens, but what I've described above is the most straightforward. Hope this helps.
Upvotes: 3