Dashboard Tracker Integer filter of 0 = blank?

I have a dashboard whose BAQ contains filed for the count of matching records. So this field is either blank or contains an integer >= 1.

The tracker pane has a filter type of GREATER THAN, for that field. Leaving the tracker’s filter field blank ignores it.

But so does setting it to 0.


But setting it to -1 yields what I would have thought that 0 would have:


The easy solution is to make the filter be “>=”. But I’m curious as to why an integer value of zero matches a blank field.

I’m assuming that the filed is “blank” and not null, as it is not blacked out. Is this correct?

On SO field is a numeric field, correct? How can a numeric field be NULL or ’ ’ ? 0 is the place holder in this case.

If that is the case, then why does >-1 remove the 0’s?

1 Like

That doesn’t makes sense, as a blank being interpreted as zero, is not great than 0
(when the blanks show up for a 0 entered in the filter)

That field comes from an outer join. What is the field value when no matching records are found?

What is the fields property?

You mean the data type of the BAQ field? It’s from a LEFT joined inner sub-query, and is an integer with formula COUNT(OrderDtl.LineNum)

If you mean the Tracker’s field,

When a form has a numeric field, it initially is blank (assuming you have not given it a default value). However at runtime, once you give it a value, you are not able to clear the field again.with a script unless you click the reset button or reload the form. Unfortunately, that will clear all the fields in the form, not just the one field.

You can compare the value of a numeric field to null, you cannot assign a null to a numeric field. The best you can do is give the field a zero value.

However, I found that you can clear a numeric field by doing the following:

input.NumericFieldName = null.toDecimal();
input.NumericFieldName = null.toLong();

Ahh, so you’re saying Greater than 0. 0 being your null value. By saying -1 you’re making your null value, 0, a number, which you’ll never have.

I would have thought that 0 would give me the desired effect of only showing records with a value of 1 or more in that field.

using -1 was just something I tried, and it worked.

Maybe you could make a calculated field with a case statement that replaces the nulls with 0? That would probably fix the confusion on the dashboard side.

I can just change the filter from “>” to “>=” and have users enter a 1.

But I was most curious as to why it behaves the way it does.

Edit: I also prefer to show blanks for no matches on outer joins, as they show up better than a 0.

1 Like