Brian Dunning's FileMaker Custom Functions

InList ( ListA ; ListB )

Will return a 1 if all items in list B are also in list A, otherwise returns 0

  Average rating: 4.2 (20 votes) Log in to vote

Makah Encarnacao   Makah Encarnacao
Soliant Consulting
http://www.soliantconsulting.com/

Share on Facebook Share on Twitter

  Sample input:
InList ( "A¶B¶C¶D¶E¶F"; "C¶B¶A¶D" )
  Sample output:
1

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

If you'd like to verify that all the items in one list are also in another list, this function will compare the lists for you. Similar to patterncount (), the first parameter is List A which is the list that will be searched, and the second parameter is List B, the filter list or search list that will be searched against List A.

 

Comments

Richard DeShong   Richard DeShong, Logic Tools
Mar 23, 2016
Hi Makah, noticed you named your function InList(), but then when you recursively called it, you used an underscore, _InList()
 
unix   unix, Japan
Mar 23, 2016
How about
FilterValues ( ListB ; ListA ) = FilterValues ( ListB ; ListB )
 
Makah   Makah, Albuquerque, NM
Mar 23, 2016
Thanks Richard for pointing that out! I have updated it.
 
Andrew   Andrew, Sydney
Jul 13, 2017
You have a space between "PatternCo unt" that needs to be removed
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.