Condition not working


I have a simple query to check if a record exists.
Run a query to check for record
Condition - is there a record? query.length
If yes, run insert query 1
if no, run insert query 2

It always runs insert 1 even if no record exists. Am I missing something simple?

Hello,
Have you tried using the “has items” condition for your query, instead of length?

what is the syntax, I tried .hasitems and it did not work.

I also tried .length, .length>0, .length==0, .length<1 with no luck. Anything I can check or look for? I stumped?

Just select the has items option from the formatters > conditional.

That is what I was expecting to see, but it is not listed.

I got it to work. I did not have brackets
checkAccount.length did not work.
{{checkAccount.length}} does work.

FIgured I was just missing something. Thanks for your help

And that is why we recommend using the UI to generate the expressions :slight_smile:

1 Like