Brian Dunning's FileMaker Custom Functions

ContainsValue ( listToSearch ; startIndex ; value )

Indicates if a list contains the specified value.

  Average rating: 4.1 (29 votes) Log in to vote

Andres Cabezas   Andres Cabezas
Domador Software

Share on Facebook Share on Twitter

  Sample input:
ContainsValue ( "white¶blue¶red" ; 1 ; "blue" )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

ContainsValue ( listToSearch ; startIndex ; value )

listToSearch : A carriage-return delimited list in which to look for a value.
startIndex : Position in the list at which to start looking for the value. Use 1 to start at the first element in the list.
value : Value for which to search.
1 if the list contains the specified value, 0 if the value is not in the list.

The startIndex parameter is required because of the recursive nature of this function.

This function requires FileMaker 8.0 or higher.



Agnès   Agnès, France
Dec 28, 2013

May be just

Not IsEmpty ( Filtervalues ( ListToSearch ; Values ))
PatternCount ( ¶ & ListToSearch & ¶ ; ¶ & Values & ¶ ) > 0

give the same result.

And to target values​​, could be MiddleValues ( ListToSearch ; 5 ; ValueCount ( ListToSearch ) ) instead of ListToSearch

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: