Jump to content

Check if value is in ValueList


Genx
 Share

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

Recommended Posts

I have a variety of fields that rely on one value list. To be valid, the contents of that field have to be a member of the value list (I don't want to use the filemaker validation because it's annoying). Anyway, i was thinking of using If(Substitute

(ValueListItems( "filename.fp7" ; "valuelist" ) ; FieldValue ; "" ) ≠ ValueListItems ; 1 ; 0 )

But the problem is it picks up incomplete values on the value list as valid. Is there an easier way of doing this?

Cheers,

~Genx

Link to comment
Share on other sites

Value list entries are all terminated with a LF/CR pair (except the last one).

Typically I add a dummy paragraph marker to the end of the value list, then I always compare with "String" & "paragraph marker", but I use the POSITION function - so any value >0 must be a valid entry.

Link to comment
Share on other sites

This topic is 5646 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
 Share

×
×
  • Create New...

Important Information

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