New Ninox 4 rule: an if … end inside a [ … ] filter or a where clause may return empty without raising an error. The fix is to compute the value before the filter or to use a for loop.
Could you please provide a general example of such a dataset query using an `if ... end` filter?
Rafael_Sanchis
vor 16 Minuten
Gemeldet - anzeigen
The rule
Inside a Ninox filter, whether [ … ] or where …, the condition is evaluated once for each record of the filtered table. If you put an if … then … else … end expression in that condition, Ninox 4 may not evaluate it correctly. And the serious part is that it throws no error: the filter simply finds no records, and the result comes out as 0 or empty.
That's why it's hard to detect: the formula saves without errors and looks correct, but the number is wrong.
Real example: Total Days
❌ Version that failed (returned 0 with 5 approved days):
sum(employees.absences[number(type) = lt and number(status) = 2 and