Hi kgplumb and welcome to the forum
You could use a combination of Script Triggering and the script step Go to Layout and setting the layout name based on a calculation, which is the value of your pop-up menu field.
You need to make sure that the values in the Value List for your Pop-Up match the names of the three layouts you have, so simply call them France, Italy and Spain.
Now create a script with the following steps:
If [ IsEmpty ( TABLE:: PopUpMenuField ) ]
Go to Layout [ Layout Name by Calculation = TABLE:: PopUpMenuField ]
Now you need to attach a script trigger to your pop-up field and point it to your new script:
- In Layout Mode highlight yoru pop-up Menu field and go: 'Format > Set Script Triggers...'
- Select the OnObjectModify event and when the laist of scripts pops up select your new script.
- Click 'OK' and 'OK'
Now that should do the trick.
I hope this helps.
Thanks for the reply Orlando, I shall try it out this weekend.
How did you get on with this, did it do the trick?
I am just getting round to trying out your answer. I am getting stuck at making the script. Here is what I have been doing.
1. I go to "Scripts/Manage Scripts. Then I click "New/Empty Script
2. From the left hand pane I choose "If" and then I choose "If" in the right hand pane and click "Specify", and the "Specify Calculation" window pops up.
3. From the "all functions by name" I pick "IsEmpty"and in the bottom pane "IsEmpty ( field )" appears. I altered the text to read "IsEmpty ( TABLE:: PopUpMenuField )" as per your instructions (or my interpretation of your instructions) but when I click OK I get the error message "The specified table cannot be found". I am thinking that I should alter the "TABLE" to read something else but I am not sure what.
As you can see I know next to nothing about scripts in Filemaker and if there are any suggestions you could give meI'd be very grateful.
My reference to "TABLE:: PopUpMenuField" you would need to change to the field you have used as your Pop-Up Menu.
When you get to the point of having the IsEmpty ( Field ) in the calculation, highlight the wode 'Field', and from the field listing, top left, select the field that you use for the Pop-Up and double click on it.
This should work, and let me know if you get stuck with anything else.
Wow it works! Thank you so much for your help. I would never have been able to figure this out without your help, as you can see I am an absolute novice at scripting. My boss is going to be extremely impressed when she sees this.
Thanks again Orlando,
No worries Kevin, glad to hear you got it working.