Refer the post http://forums.filemaker.com/posts/c8a90842f6?page=1
here PhilModJunk has submitted the demo file (fp7), https://www.dropbox.com/s/8levaz6deiyzjr8/LayoutObjectVisibilityControlDemo.fp7 which you can refer. Check the 'transparent tab control' technique.
Here's thefull list of links that I recommend for learning about conditional value lists. And to answer your specific question, if you want a script to change what values appear in a conditional value list, you design the script to edit the value in the match field on which the conditional value list's relationship is based.
There's a lot of overlap between the first two links so you can read one and skim the other. The demo file gives you several examples of different conditional value lists so you can examine them to see how they are set up. If you are using FileMaker 12, you can open this demo file from your File menu to get a converted copy of the demo file that you can examine in FileMaker 12.
The last link discusses how to set up a chain of conditional value lists where the value selected in each conditional value list controls the values listed in the next value list.
Forum Tutorial: Custom Value List?
Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list
Hierarchical Conditional Value lists: Conditional Value List Question
Feel free to post follow up questions here if those links aren't enough to get your value lists working correctly.
This is not the case.
For example: In Person Type Table
Person ID | Person Type | Department | Subject
1 | Student | Music | Piano
2 | Student | Academic | French
3 | Student | Arts | Drawing
4 | Tutor | Music | Violin
5 | Student | Service | Piano Tuning
6 | Tutor | Service | Recording Engineer
For example in the Class table
Class ID | Department | Subject
1 | Music | Violin
2 | Academic | Japanese
3 | Arts | Painting
For example in the Service table
Service ID | Service Name | auto_enter_Service
1 | Piano Tuning | Service
2 | Studio Engineer | Service
...to be continued in next post
....continued from last post.
I know how to set a conditional list. But my problem is in the Subject field of Person Type table.
I want the following to happen.
If Music or Arts or Academic is chosen in the Department field, then in the Subject field, it uses value list from Class table to choose Subject.
If Service is chosen in the Department field, then in the Subject field, it uses value list from Service table to choose Service Name.
So the problem is how to switch between the 2 value lists based on value of Department field. Is there a script to change the value list?
If I choose "value list from Class", it works fine but not for Service. If I choose "value list from Service" then only applicable to Service. Any way to specify which value list a popup list use?
This cannot be done exactly as you describe in FileMaker with a conditional value list. But the data in the class and service tables could be combined in a single table and then the standard conditional value list can list values from this combined table of values selecting for either "service" or "Class" subsets of the records in this unified table of values.
An alternative approach might be to place two copies of the Subject field in two panels of an invisible tab control and format each with a different value list. Selecting Service in the Department field can trip a script trigger that performs a script to select the tab panel for copy with the service value list. Selecting a different value causes the script to select the panel with the copy of the field that is formatted with the class value list.
I solved by making 2 layout of the same, for Subject field in one layout i format to use "value list from class table", in another one format to use "value list from service table"
Onobjectmodify at the Department field, move to corresponding layout based on which department chosen.