Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Set a an alternative drop down value list on one drop down field


Recommended Posts


(Filemaker 13 Pro Advanced new user. Recent Access convert)


I have created 2 drop down fields with value lists and wish (in Find mode) to invoke an alternative value list to display on the second drop down field list when the first drop down is left empty.


The first drop down field displays 'Areas' of a house (the rooms and areas of a house)

The second drop down field displays 'Parts' (parts of a selected Area such as ceiling, floor, walls etc.)

(I have named each of the drop down list fields. The names = AreaChoice and PartChoice


In Find Mode. When an 'Area' is selected from the first drop down field value list the second drop down field is populated only with 'Parts' relevant to the selected Area. The value list for the Part drop down field is working fine.



If no 'Area' is first selected nothing shows in the 'Part' drop down list. This is as expected but I would like display an alternative value list for the 'Part' drop down field to display when no Area is first selected.



What would be the script steps triggered when entering the second drop down field to test the first field for empty and if empty display an alternative value list.


I don't know where to start on this problem other than I can trigger a script on the second field entry. I can then script an If statement to test if the first field is empty or not but it is the steps beyond (to place the relevant value list in the second field that are confounding me. Any guidance on creating a suitable script with steps will be appreciated.



Link to comment
Share on other sites

Easiest approach: put another copy of the Part field onto the layout and attach to it your alternative value list.


Give both copies a Hide if calculation of not IsEmpty ( Area ) and IsEmpty ( Area ), respectively.

Link to comment
Share on other sites

Excellent. (I never thought of that approach)Thank you


Could you point me to a function to hide or show a field?

Presuming I create a new drop down field named PartChoice2 to display the alternate value list.


I anticipate triggering a script on entering the existing PartChoice field.

If AreaChoice = "" then Hide PartChoice and Show PartChoice2 if not Show PartChoice and hide PartChoice2


It is the show and hide field syntax or function part of an If statement that I will have trouble locating if such a function exists. Any further assistance will be appreciated.



Link to comment
Share on other sites

I anticipate triggering a script on entering the existing PartChoice field.


You anticipate wrong :D; “Hide if” is an attribute* that you can add/set to a layout object in the Inspector -> Data tab; it has nothing do to** with the If[] script step.


You may need a script trigger to refresh the window to make a field swap take effect


*Akin to the 'hide' attribute of an HTML element.


**You could of course use a script to change one of the inputs that is used in the Hide if calculation …

Link to comment
Share on other sites

Thank you for your assistance.


I am now a bit more confused. I expect my if statement example may have been be confusing as it was not meant to be code, (just a sentence setting out what I wanted to achieve.) Are you saying that it would not be possible to hide (or show) a field within an If statement?


If it is possible could you help with a calculation example. Or possibly a 'Hide object when' calculation example I could use in the Behavior section of the Data tab of the Inspector for the fields which need to hide or show dependent on whether or not the Area field is empty?

Link to comment
Share on other sites

Tony –


forget about If[]. That is a script step, and you don't need a script.


Do this:


• go to your layout

• switch to Layout mode

• select the Part field that is formatted as popup with the standard value list

• in Inspector -> Data, click on the pen icon for “Hide object when”

• in the Specify Calculation dialog, type IsEmpty (), place the cursor between the parentheses, and double-click the Area field from the field list at the top; so now this should read

IsEmpty ( YourTableName::Area )

• on the layout, duplicate the Part field

• assign it the alternative value list

• return to the Inspector and change the Hide calculation to

not IsEmpty ( YourTableName::Area )

• stack the two copies of the Part field on top of each other

• return to Browse mode and watch what happens when you fill or clear the Area field

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use