Brian Dunning's FileMaker Custom Functions

JSON.OmitArrayValues

This function will allow you to omit a list of values from an array using values from a second "Omit" array.

  Be the first to rate this function Log in to vote

Kyle Williams   Kyle Williams - Show more from this author
Augusto Digital
https://www.youtube.com/channel/UCpJlB7cmVNMjbjgY96MEsng

Share on Facebook Share on Twitter

  Sample input:
JSON.OmitArrayValues ( "[1,2,3,4]" ; "[4,2]" )
JSON.OmitArrayValues ( "[\"a1\",\"2b\",\"3\",\"4\"]" ; "[4,2]" )
  Sample output:
[1,3]
["a1","2b",\"3\"]

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

I recently worked on an API where I had to use employee ids from FullSlate's calendar scheduling app. The api call required employee ids in order to find records for availability, personal breaks, and appointments for each employee.. I found I was able to get a full list of the employees but many in the list had been deleted over time.

Because of this I needed to omit many of the ids from the array I was getting. This function was created to solve this need to produce a more refined list of ids for my api calls. I thought this might be a useful function for the community so I'm sharing it here :)

 

Comments

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 21 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: