I’ve got a BAQ feeding a dataview which is bound to a grid.
The BAQ has a DateTime? column which returns nulls for some rows.
I’ve set up row rules to highlight dates that are < a set date.
However, when evaluating the less than operator, it matches true for null values as well.
It would seem obvious to me that I could add a second condition to my row rule with an AND, and exclude null values, however this does not appear to function correctly on a DateTime? column. I’ve reported this as a bug.
Yes, same output.
As a workaround, I set up a calculated field in my BAQ to output different values depending on the date maths, and set up my row rule to match against that calculated field. The DATEDIFF function in BAQ properly ignores nulls.
case
when (DATEDIFF(DAY, RcvDtl.ReceiptDate, Constants.Today) >=3 AND DATEDIFF(DAY, RcvDtl.ReceiptDate, Constants.Today) < 5) then 3
when (DATEDIFF(DAY, RcvDtl.ReceiptDate, Constants.Today) >=5) then 5
else 0
end
My understanding is that null is the absence of a value.
Even a true/false boolean can be null. Until it is checked True, or False, it is “unknown” and therefor null. That’s why most Boolean fields have a default value of either true or false and you can flip them. But if there is no default value and you don’t choose True OR False… then it is null (absent a value).
So, I’m assuming for dates… an empty date field is not holding a value of 0, or empty " ". Its just nothing (null) until a value is assigned.
I ended up implementing the workaround of the less than date logic in the BAQ, and returning a calculated field for my row rule.
I did test adding an AND criteria, with contains = Null per your suggestion, and this did function as desired.
However, the row rule is less than should never match null values in , as a null is a special value that is not a date.
I also encountered this issue and tried this solution to effect. To clarify, the syntax is Contains > Value > Null. Ignore the Constant > NullValue option - it doesn’t work.