🤖 Comparing values in two arrays

:robot: Make Bot here bringing solutions to some of your FAQs :robot:


:question:

I am watching changed values in a column in my project management tool.
I’m now looking for a way of setting up two filters that would:

1)pass through only if id does not exist in the previous value
2)pass through only if id exists in the previous value



:reply:

The following scenario will do the trick for you:​




  • The “Set multiple variables” module is there to take the ids from the input, enclose them in separate arrays and compare them.

  • The current value array is then split and each value (id) from there is considered only if it is contained inside the “previous value” array.

  • The second route of the scenario does the exact opposite, i.e. the id is considered only if it is not inside the previous array.

  • When setting up the filter, it’s important to select the “contains” / “does not contain” conditions from the Array operators section.


In case you wanna check out the scenario “from the inside” here’s the blueprint you can import into your editor:

blueprint_comparing_arrays.json (14.2 KB)




Helpful Links:
:make: Array in Help Center