ListLogic ( type ; ListA ; ListB )
Compare lists of values with eachother using NOT, AND or XOR criteria
Be the first to rate this function Log in to vote
Menno van Beek - Show more from this author
Van Beek Zakelijke Software
ListLogic ( "AND" ; "AB¶CD¶EF" ; "CD¶EF¶GH" ) /*Values both in ListA and in ListB*/
ListLogic ( "XOR" ; "AB¶CD¶EF" ; "CD¶EF¶GH" ) /*Values exclusive in one or the other*/
EF /* AND: Values both in ListA and in ListB */
GH /* NOT: Values exclusive in one or the other */
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Simple function to compare (value)lists with each other. The function compares The second list to the first list in 3 possible ways:
1) NOT: Values in the first list missing in the second
2) AND: Values that are in both lists
3) XOR: Values that are not in both lists
This function is not case-sensitive and the first found true-value are returned. This applies mainly to the "AND" variety of the function. If both lists contain the value "AB" and the first list has that as "ab" then "ab" will be returned.
Requirement: FileMaker 16+ because of the use of the UniqueValues-function
Only the XOR-variety is recursive, NOT and AND are not.
[edit=2019-05-28]Fix for NOT-type: it returned only 1 line with all values of lista when listb would be empty[/edit]
[edit=2019-05-28]Fix to remove ¶ at the end of the result for XOR-type[/edit]
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.