ken
June 8, 2020, 3:23am
1
Build web apps and services that run on Windows, Linux, and macOS using using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.
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?
ken
June 8, 2020, 6:05am
3
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.
ken
June 8, 2020, 7:00am
5
That is what I was expecting to see, but it is not listed.
ken
June 8, 2020, 7:20am
6
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
1 Like