Jump to content

Determine if item is member of a value list


This topic is 7311 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Can anyone clue me in as to how to determine if a value in a field is a member of a value list? I have date field that I'd like to check to see if it matches a list of dates that are contained in a value list that gets its values from a field in another file.

Basically, the value list contains the dates that my organization is closed for holidays, and I want to check that a value in a date field that is automatically entered by a script using a calculation does not get entered if the date matches one of our holidays.

This might seem simple, but I can't find the answer anywhere. Any assistance would be greatly appreciated!

FileMaker Version: 6

Platform: Mac OS X Panther

Link to comment
Share on other sites

Kevin->

This function will return all items in a value list which is in the current file:

ValueListItems(Status(CurrentFileName), "ValueListName")

To see if a field's contents are in the Value List, use the Position function as a boolean (0 = no, non-zero = yes):

Position(ValueListItems(Status(CurrentFileName), "ValueListName"), FiledName, 1, 1))

Will this do what you need?

Sam

Link to comment
Share on other sites

This topic is 7311 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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