CHawk Posted August 1, 2010 Posted August 1, 2010 If I wish the result of a user's entry in a questionnaire text field to command the selection of a particular tab in my layout, and a particular field in that tab, I assume that I need a script to do this. If the initial text field has four choices, and the result of this drop down list selection means that the user should enter data in different sections of the layout. I want the script to open a particular tab, and select a particular field. Any advice would be gratefully received!!!
bcooney Posted August 1, 2010 Posted August 1, 2010 Use an OnObjectModify script trigger attached to the dropdown. It will go to the tab panel (name the tab object) and then go to the field. You can use a hidden tab panel (no lines).
cpe1704tks Posted August 1, 2010 Posted August 1, 2010 cHawk here is an example with the tabs showing. I did a very simple script. I am sure Bcooney can create a better script, but this should work. cpe1704tks opentab.zip
CHawk Posted August 1, 2010 Author Posted August 1, 2010 (edited) That is brilliant!!! I made a mistake and left a redundant duplicate field out of view off the screen which puzzled me for a while, because the script was triggering to that duplicate field, but now everything is clear. The script seems to work perfectly! Thanks for your help. Edited August 1, 2010 by Guest My mistake
cpe1704tks Posted August 1, 2010 Posted August 1, 2010 CHawk, I just re-downloaded the file and it works as described. If I create a new record and select choice 1 it selects tab 1 and choice 1 field, so do the other choices. I created a new empty tab on the file so you can see it move. Try creating a new record and select choice 1 and you will see the cursor move to the choice field 1.(this is the exact same file except for the new tab) Hope that helps opentab.zip
bruceR Posted August 1, 2010 Posted August 1, 2010 Note that if the fields are not redundant, you only need to go to the field. The tab will be selected because that's where the field is. And even if the fields are redundant, you can give them object names, and to to the object instead. With the same result. You do not need to script the selection of tabs.
CHawk Posted August 2, 2010 Author Posted August 2, 2010 Thank you for this help.....I have a related question, though. Is there a way, once you have different records with different tabs completed, to ensure that the tab that has been completed is that tab that is open every time you go to that record. For example, Contact 1 has fields in Tab 3 completed, but Contact 2 has fields in Tab 2 completed. Can you force the correct specific completed tab to be open in whichever Contact's records you select???
cpe1704tks Posted August 2, 2010 Posted August 2, 2010 (edited) CHawk, I have just created a simple script, but it does have one flaw. If there are more than 1 tab with information it will stop at the first one. There can only be one tab open at a time as you well know. Try this file here. If it does work for you let me know, if not maybe BruceR has some more info. I am still learning Filemaker myself. Good luck ! of the 2 files is incorrect. I think the second on is the correct file. Sorry cpe1704tks opentab.zip opentab.zip Edited August 2, 2010 by Guest
CHawk Posted August 3, 2010 Author Posted August 3, 2010 Hey cpe1704tks, The script works perfectly, and it is very clear to me how it works!! Thank you very much for your help, and sorry for the delay in getting back to you. I have already learned a lot from seeing the scripts put together in this way. Good luck with your Filemaker development!!! CHawk!!
Recommended Posts
This topic is 5227 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