Skip to main content
10-Marble
October 6, 2020
Solved

query filter on null/undefined values?

  • October 6, 2020
  • 1 reply
  • 2915 views

I'm trying to create a query with filters based around some dates but I'm not clear on how I can create a filter where I know a value might be null/undefined.

 

For my example, I have startDate and endDate in a data table.  Start is always defined.  End might be defined or might not be.  (If there is an end date, the record expires;  if not, it lasts forever.)

 

So generically, my query needs to be something like:
if startDate <= currentdate AND (endDate > currentDate OR endDate is null)

 

However, I can't figure out a way to accomplish the null/undefined check.  I've a tried a few things, but none of them remotely worked.  (Combinations of EQ, LIKE, null, undefined, "", etc.)

 

Any ideas?  It doesn't seem like this should be that hard...

 

Thanks,

Tony

Best answer by tbone7281

Figured it out:  the trick is to use the type of "MissingValue" in the filter and then not even use value.

1 reply

tbone728110-MarbleAuthorAnswer
10-Marble
October 6, 2020

Figured it out:  the trick is to use the type of "MissingValue" in the filter and then not even use value.