Brian Dunning's FileMaker Custom Functions

SubtractValues ( list ; list2 )

This functions subtracts list2 from list1, where both lists are in the format returned by the ValueListItems design function.

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

Jonathan Stark   Jonathan Stark
Jonathan Stark Consulting
http://jonathanstark.com/

Share on Facebook Share on Twitter

  Sample input:
list1 = "1¶2¶3¶4¶5¶6¶7"
list2 = "7¶2¶4"
  Sample output:
list3 = "¶¶¶1¶3¶5¶6"

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

This functions subtracts list2 from list1, where both lists are in the format returned by the ValueListItems design function. It is the reverse of the built-in filterValues function. SubtractValues is useful for displaying the unselected members of list in a portal.

Note: I didn't bother trimming the leading return from the result because I was using it as a multikey for portal filtering.


There are a couple of other custom functions on Brian's site that are similar, but I think it is helpful to see all different ways to skin the cat. This page is a nice resource, by the way - kudos Dunning!

 

Comments

Vaughan   Vaughan, Sydney, Australia
Jun 23, 2011
Thanks Jonathon.
 

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.