I have an array made from an array aggregator that stores data like this:
I want to make a filter that checks if at least one email in the array is filled with a value. That way, I can route it to do more actions to find the email I need.
I have an array made from an array aggregator that stores data like this:
I want to make a filter that checks if at least one email in the array is filled with a value. That way, I can route it to do more actions to find the email I need.
Hey there,
you want to route the entire array if at least one item inside has the email filled? Or you want that item only to be routed?
The map(1.array;email) function can give you a primitive array with only emails, then you can use remove() on it to delete any items with {{null}} or {{emptystring}} values and then you can check if the array is empty or has something left inside.
That’s exactly what I want to do! So I would use this filter like length(remove(map(15.array.email; “email”); emptystring)) to get the length of that primitive array and I can check if it’s zero or not?
Yeah something like this should work. Except you map the full array 15.array and not the .email subitem. You will also have to test with both emptystring and null.
I got an error that stated: Failed to evaluate filter ‘0-0’: Function ‘length’ finished with error! Function ‘remove’ finished with error! Function ‘map’ finished with error! ‘JGrafft@blaineschools.org’ is not a valid array. This happens to be the only part of the array that has email filled out. Is that why this error is occuring?
15.array.email will give you the email value from the first item inside the array. It needs to be only 15.array