Thanks to several bright persons on this forum I have managed to put together a useful invoicing solution for a small business I support. My latest breakthrough has been to use the OnObjectModify script trigger on a Tab Control to run a script. In my solution this changes the layout from a "Detail" view to a "List" view by going to a different layout. This works as long as you have only two Tabs as it runs the same script upon any Tab selection. My question is; is there a way to get information about which Tab was clicked on? I have tried adding an Object Name to each Tab and using the Get(ActiveLayoutObjectName) function but so far that has not worked. Has anyone had any success with using Tab Control selection to trigger/control events? Thanks
Have you checked out the OnPanelSwitch script trigger and the Get (TriggerCurrentPanel) and Get (TriggerTargetPanel) functions? Sounds like it is what you are looking for.
Thank you Steve Romig and coherentkris for your prompt replies. I forgot to mention I am working with FMP 11 so those script steps don't seem to be available. However, as these things sometimes go, I keep digging and found the script function below that can test for the object name of the Tab selected. With this I can use an If structure to control what the script triggered by OnObjectModify does. Thanks again.
GetLayoutObjectAttribute("Clients List Tab";"isFrontTabPanel")