dragonmaster Posted November 19, 2009 Posted November 19, 2009 (edited) I am new to scripting. I want to have a tab be selected based on a dropdown box. I can do this with a script and object name, but is there a way to trigger the script based on a calculation? I am using this for class passes. I have three tabs General Pass, Nurse Pass, Dress Code Pass. The default is General. For example -- If nurse pass is selected from drop down then the nurse tab is shown. If Dress code is selected from the pass type then the dress code tab is shown. Thanks. Edited November 19, 2009 by Guest
Newbies Mike Cavalieri Posted November 19, 2009 Newbies Posted November 19, 2009 May I ask why you desire to use a calculation? It sounds like a script passing a parameter (maybe with a script trigger?) to select the appropriate object (tab) would suffice. Are the "Nurse" and "Dress Code" choices chosen on another layout, so that when you arrive to the layout containing the tabbed object, the appropriate tab is selected?
dragonmaster Posted November 19, 2009 Author Posted November 19, 2009 Mike, That is probably what I need. I just do not know how to do it. I can write the script to get the tab selected. However, I do not know how to get it trigger except by using a button which kind of defeats the purpose. If the user has to click a button, then it would be just as easy to click the tab. I would like when the user chooses the type from the drop down list, then it will go to that tab. Nurse and Dress Code are used on two other layouts 1. the actual pass layout and 2. on a summary report, but neither of these layouts have tabs. Each is accessed only from a button with an appropriate script. Does that you give you enough info to help? Thanks, Michael May I ask why you desire to use a calculation? It sounds like a script passing a parameter (maybe with a script trigger?) to select the appropriate object (tab) would suffice. Are the "Nurse" and "Dress Code" choices chosen on another layout, so that when you arrive to the layout containing the tabbed object, the appropriate tab is selected?
Newbies Mike Cavalieri Posted November 19, 2009 Newbies Posted November 19, 2009 Michael, I have drafted and tested the following idea, maybe this will help you on the right track. 1. Name your tab objects in your info window as appropriate: General, Nurse, Dress Code. 2. Create a script called "Tab Nav". 3. Write the script reflecting something like the attached image. 4. Attach the script trigger "OnObjectModify" to the drop down menu (I would maybe use a pop-up instead, though, to prevent someone typing into the field) to trigger the "Tab Nav" script, passing the parameter of the field name to the script. Now, as you change the drop down, the focus of the tab changes. Mike
dragonmaster Posted November 20, 2009 Author Posted November 20, 2009 Mike, It works. Thanks. I had to do a little figuring to get it implemented as I first tried to type it in just as your example. I then got smarter and figured out each step. Works like a champ. Thanks again and have a great holiday. Michael
Recommended Posts
This topic is 5550 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now