Script switches tabs
I have a script (see below) and every time I assign it to a button, when the button is clicked it takes me back to the first tab, this button is located on the 2nd tab. Any ideas why?
Seems to me its because the first tab is set as your "default front tab"
if you assign tab 2 with an object name and than at the end of the script go to object name
It should return you to tab 2
The same script runs on each button but is passing a different "Optional
Script Parameter" for each of the values. 1-5, and each of the tabs have
the same buttons. Is there an easy way to pass another "optional
script parameter" for the Goto Object? Or any other suggestions?
You need to:
Enter layout mode
Select each tab panel in turn (click once to select the tab control, click again to select the panel.)
Then use the Name box to assign a unique object name to each tab panel
The value you pass as a script parameter can then be the object name of the panel and Go to Object can specify the tab panel you want to retain as the front tab panel.
Sorry, not sure I am understanding...I am currently using the script parameter to pass the value of the button. For example, if they press one I use the script parameter of one to add that value to a field. Is there another way to pass a script parameter in addition to that on the same script?
No, but if you need to pass more than one value in the same script parameter, this can be done.
Say you need to pass the button value of 3 and the object name of "Serving Tab" to the same script via a button click. Your script parameter expression inside button set up can be:
List ( 3 ; "Serving Tab" )
and your script can then parse the two values by using:
GetValue ( Get ( ScriptParameter ) ; 1 ) to extract the button value and use GetValue ( Get ( ScriptParameter ) ; 2 ) to extract the object name of the tab panel.
Retrieving data ...