Just a point of clarity: the expressions AppSheet uses are not SQL. If you say “SQL”, that means something particular to many people. We call what AppSheet uses “expressions”. I offer this clarification to help you avoid confusion in the future.
As to why my expression works where yours doesn’t… I suspect it’s because of a quirk in the way AppSheet handles the is-equal operator (
=) and is-not-equal operator (
<>). For some reason, if the left-side operand to
<> is blank, the result will be TRUE regardless of the right-side operator. For instance, consider this from your expression:
([Usager] = USEREMAIL())
If the row’s Usager column value is blank, that expression is TRUE, even if USEREMAIL() gives a non-blank value!
But this is likely the actual problem:
([Date debut] <> "")
If the Date debut column value is blank, the expression is TRUE, even though your intention is specifically to test that it is not blank!
To work around this quirk, the left-side value should be non-blank. USEREMAIL() will always give a value, so I swapped it around:
(USEREMAIL() = [Usager])
To test whether a value is blank or not, rather than comparing to
"", I used the fuctions specifically provided for this purpose: