This is one form of a conditional value list. The one thing to look out for is that your check box formatted field must be sized to whichever set of check box values is the largest.
Here are some links on conditional value lists. The demo file has a checkboxes example in it.
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.
Hi Phil, thanks for the material. The demo file helped but actually I don't want to show different checkboxes. The list of available (displayed) checkboxes is fixed, and I want to auto-check the appropriate ones based on the other field selection. Examples:
- case 1: on the dropdown menu that will trigger the checkbox filling, if I choose option A; that triggers the screen capture A below;
- case 2: if I choose option B, that triggers the screen B
here goes screen B...
Ok, that's NOT a conditional value list.
This will either be a static or dynamic "look up" from another, related table linked by field1. "Dynamic" in my personal jargon, means that if you edit the related table, all your records in the original table automatically update. With a "static" look up, an auto-enter field option copies data from the look up table and thus changes to it do not automatically update what you see in the check box field for existing records.
Either way you need two things: A relationship to the lookup table and the ability to generate a return separated list of values for your check box field to use to display as selected checkboxes.
Also, checkboxes imply that the user can click them to select values and/or clear the selections. Is that something the user will need to do? This works for the auto-enter (static) option but not the dynamic one.
The simplest table design for the look up table would be two fields:
Category (field1) , Value (value for checkbox group)
and this relationshp:
Yourtable::Field1 = LookUptable::Category
Then this expression produces your return separated list of values for the check box formatted field:
List ( LookUptable::value )
For a dynamic link, define this in a calculation field in your original table and format the field with your check box group, specifying the value list shown in your screen shot.
For a static link, define a text field and use this expression as the auto-enter calculation for it.
Note: the reason this works is that checkbox groups build a list of return separated values in the field as check boxes are selected by clicking them with the mouse. This calculation duplicates that data structure and thus results in showing the values returned/copied as selected check boxes when you apply the check box format and value list to the field.