Filter by comparing values from 2 arrays

A webhook contains 2 complex arrays; Value, Previous Values.
Each of these contains keys for Name, id, color

I am trying to create two filters that compare the values of the ID field from both arrays

For instance if the webhook returned ID values of 1,2,3,4,5 for Values and 1,2,3,4 for Previous values, the filter would only allow 5, as the value is contained in Values, but not contained in previous values

The 2nd filter would need to do the opposite of that - only allowing those values that were in previous values but are not in values to pass. Ex. Values array contained 1,2,4,5 & Previous Values array contained 1,2,3,4,5 - the filter would only allow 3 to pass as it is contained in previous values but is not contained in values.

In the screenshot attached the example the hierarchy of the bundle.
Any help would be greatly appreciated!

1 Like

Hey @Matt_Tesdell
This does sound complex but should be totally doable in many ways. I’d point you toward using map formula to get all the ids, convert them into an array and then using deduplication formula to get unique ids.

1 Like

@Matt_Tesdell

For the 1st, just use an iterator on the value.tags array then the filter would look something like this:

For the 2nd, iterate the previousvalue.tags array and a filter like this:


Jim - The Monday Man (YouTube Channel)
Watch Our Latest Video: A monday Status Column Tip - When is “Done” really DONE?
Contact me directly here: Contact – The Monday Man

3 Likes

Hi Jim,

Thank you for the idea! I’ll give it a try and let you know if I get it to work. Seems like it should.

Hey Jim,

That worked!
Thanks so much for the help!

Best,

Matt

1 Like

So glad I read this post! I didn’t know you existed until just now @JimTheMondayMan - you just got yourself a new sub. :sweat_smile:

2 Likes

@johnematias

LOL, Thanks! Glad to hear it!

2 Likes