Normal expressions allow booleans to be evaluated without comparison, and the not operator, e.g.:
if(not myBool, "hello", "hi")
In simple query expressions however, we need to explicitly check against True or False, and the not operator is not allowed:
Entity.Attribute = False
I'd consider that bad coding style in a normal expression. Why can't we use "proper" boolean expressions in simple queries?
The idea here is to let the developer use only the boolean attribute name when setting a filter on an aggregate with it, instead of the attribute name plus the condition (=true or =false). Please see the attached pictures as an example.
I think it would be useful if it was possible to filter aggregates with just boolean variables, with a boolean variable IsActive as an example:
- IsActive = true -> IsActive
- IsActive = false -> Not IsActive
Hi Kilian Hekhuis,
Thanks for your feedback.
I'm glad to let you know that this improvement has been release on the first version of OutSystems 11 and all later version (Release Notes)
Keep the feedback coming.
Thanks,