Jump to content
Sign in to follow this  
TASC

validate field entry by value list

Recommended Posts

Hi,

I have two fields that are filled in from a drop down list. Once the user selects from the first drop down, the next field needs to be populated from a drop down with the "child list" of the first field. If the first field is changed, then the second field must have values from the related "child list"

eg.

first field drop down list is:

North

South

second field drop down list is based on the first field choice as follows:

If first field north, drop down shows

1a

1b

if first field south, drop down shows

2c

2d

I have this working except for a validation on the second field. I need to validate that the second field is populated with only one of the values from the related drop down. So that if a person selects south, and then 2d, they can't later go back and select north, but leave 2d in the second field. The system will error out and say "you need to select from the list provided (which would now be 1a, 1b). Hope this makes sense.

I have tried to put a validation on the ddr2 field but it isn't working quite as I expected. I have provided a db for review.

Thanks so much for any feedback.

Constance

drop_down_list_validation.zip

Share this post


Link to post
Share on other sites

Validation by "Member of value list" triggers on field exit - therefore modifying another field, and the contents of the value list as a result, will not cause Filemaker to re-examine all fields that use the value list.

Use a validation by calculation instead:

not IsEmpty ( FilterValues ( drop down 2 ; ValueListItems ( Get ( FileName ) ; "dd2" ) ) )

and uncheck the "Validate only if field has been modified" option. This will trigger on committing the record.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.