I've used 'freeze window' to prevent flicking onto the default tab during a script, but it focus still moves there before being pulled back to the tab I want it to stay on.
Is there a solution?
You said there's no trigger on the tab object, but is there a layout trigger?
Another thought: what version of FileMaker do you have? It's possible that an older version of FileMaker behaves as you describe, but the current version doesn't.
Also: is there anything in the "allow user abort" script we need to know about? I'm assuming not, but ya never know.
perform script on server, or place the fields from the second tab that you are modifying off-screen so you don't need to tab to them.
In addition to what Mike said, what are you doing during the script that is making it move to another field? If you are setting data, usually you would just use Set Field [ ], which doesn't even require the field to be on the layout.
Mike and Joshua, Thanks.
Perform Script [ “Allow user abort” ]Enter Find Mode [ ]Set Field [ Patient::__uuID; Global::gSelectPatientID ]
Perform Find [ ]Go to Object [ Object Name: "tab_patient" ]Commit Records/Requests
The above is triggered when I select a patient from a pop-up. There is no script trigger on the actual tab. My 'Go to object' line is simply to get back the Patient tab from the default front tab. I rather wish there wasn't a default for all the hassle it causes!
Are you able to post a screenshot of the layout, maybe in Layout Mode with View > Sample Data off. So we can get a sense of how you have it laid out.
Apologies for the delay. Tom you were right. There was an 'old' layout script pulling focus to certain objects. Because there were objects rather than a tab/layout I missed the connection.
Retrieving data ...