August 1, 201015 yr 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!!!
August 1, 201015 yr 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).
August 1, 201015 yr 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
August 1, 201015 yr Author 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, 201015 yr by Guest My mistake
August 1, 201015 yr 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
August 1, 201015 yr 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.
August 2, 201015 yr Author 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???
August 2, 201015 yr 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, 201015 yr by Guest
August 3, 201015 yr Author 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!!
Create an account or sign in to comment