Following on from this thread, I've managed to update my solution to use a button bar and sliding panels to access various aspects of data. The main reason for moving to this approach was to allow specific styling for the buttons when clicked, to show which 'panel' was the active one.
From any of the 'tabs' a user can edit the overall data via a different layout (accessed via a button) and several 'tabs' have links to different layouts, but have been asked to ensure the user is always returned back to the same 'tab' they left from.
So I've got it working by doing the following:
Each button calls a script called 'GotoTab' and passes a single parameter, i.e. for button 1 it's "Client¶1", for button 5 its "Client¶5" etc.
Here's the script for GotoTab:
Where the SPR function is simply:
GetValue( Get(ScriptParameter) ; Value )
For the layout which contains the 'tab panels' has an on-load event set to run a script:
so between these scripts, the user is returned back to the correct tab but there is just one issue. The 'selected' button is not activated, so the styling for the 'active' button is set against the first panel, even though it is on, say, the fifth one. The 'active' tab displays by having a different colour top edge to the others (purple vs dark grey), and so whilst the code works and the user is returned back to the correct place, the styling isn't working. I tried naming each button and adding :
Go to Object [Object Name: $$TabPrefix & "_Button" & $$TabIndex]
but obviously that just makes the button selected, not active.
So the way I see it, I need to script clicking the button - is this possible in FM? I've done some searching and can't find anything about it.
Any help or advice gratefully received.