Brian Dunning's FileMaker Custom Functions

ListXor ( ListA ; ListB ; Counter )

Returns everything in one list, but not the other (and vice versa)

  Average rating: 4.4 (40 votes) Log in to vote

Daniel Wood   Daniel Wood - Show more from this author
Digital Fusion Ltd
http://www.teamdf.com

Share on Facebook Share on Twitter

  Sample input:
ListXor ( List("A";"B";"C") ; List("C";"D";"E") ; 1 )
  Sample output:
A
B
D
E

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

Returns everything in one list, but not the other list (and vice versa). This is a recursive function - the maximum number of iterations is restricted to the number of items in the largest list.

 

Comments

Gilles Berkovitch   Gilles Berkovitch, France
Apr 24, 2016
This recursive function refers to the XORValues function instead of itself. This issue fixed, the function seems to work.
 
Gilles Berkovitch   Gilles Berkovitch, France
Apr 24, 2016
Then, a simplified version could be:

If ( Counter > ValueCount ( ListA ) And Counter > ValueCount ( ListB )
; ""
; Let ( [ ValueA = GetValue ( ListA ; Counter )
; ValueB = GetValue ( ListB ; Counter )
]
; List ( If ( Not IsEmpty ( ValueA ) And IsEmpty ( FilterValues ( ListB ; ValueA ) ) ; ValueA ; "" )
; If ( Not IsEmpty ( ValueB ) And IsEmpty ( FilterValues ( ListA ; ValueB ) ) ; ValueB ; "" )
; ListXor ( ListA ; ListB ; Counter + 1 )
)
)
)
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 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:

Under construction. Email me your wish list for improvements.