cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Checking for the presence of an array

dcornwell
Deputy Chef III
Deputy Chef III

Hi Folks,


So to check for the presence of an array (i.e. that there is at least 1 item in the array), as far as I'm aware you need to do a formula to check the length of it. i.e.


array.length (<-formula)

greater than (<-condition)

0 (<-value)


Doing just an 'is present' condition doesn't work. Is there something else simple like this that I'm missing?


(and Hi - first post on the Community!)


Regards, David.


6 REPLIES 6

ekta-saxena
Deputy Chef I
Deputy Chef I

We can check the size of an array in the 'If condition'.


rob-lucian
Deputy Chef I
Deputy Chef I

Hi David,


I normally use the "List Size" datapill when I do my conditions, but I set them up very similar to what you posted.


.present? might help you depending on your desired output.

dcornwell
Deputy Chef III
Deputy Chef III

Thanks - I should have elaborated that I'm doing that in an 'if conditon'. Main question was really whether there is another way other than looking at the list size/length. Another platform I use can check arrays with an 'exists' condition (equivalent to the 'is present' in Workato).

dcornwell
Deputy Chef III
Deputy Chef III

Ah, OK - thank you Rob (my previous post was not in reply to yours)