Whats the condition I need to use to check if a database query return results? on the format condition for an object is not available the has items?
I have use the count but I think is not working.
Whats the condition I need to use to check if a database query return results? on the format condition for an object is not available the has items?
I have use the count but I think is not working.
I am on server connect I have a database query I want to if the database query is empy set value to a variable.
In same case I usually use method .count()>0
I'm not sure if it as a bug or expected behavior, but on Wappler 6.7.3 your approach returns THEN even if array is empty.
Interesting, never had issues.
What if you move the query outside the first condition?
Expressions are based on JavaScript, for a condition it checks if the value is truthy and an empty array is truthy.
@patrick meaning the only way to check if database query returns nothing is- .count()>0
?
yes, the count
formatter is the best way to check if a collection is empty.