Search code examples
dotnetnuke-module2sxc

2sxc : Query designer - less than or empty (and / or)


I have entity with field "DateEnd" that is not required.

I want to make query with query designer to filter all items with "DateEnd" field les than value (eg.:"2016-06-01") or empty value for "DateEnd"

I know that I can add value filter with: Attribute=EndDate, Value=2016-06-01, Operator='<='

to get all items with "DateEnd" entered, but then items with not entered date are missing.

Is posible to make query in designer to return me also this items with date null values?


Edited:

If I "chain" value filters I can get "AND" operation for filters, but how "OR" operator can be done?


Solution

  • As of now - 2sxc 8.5 - there is no "also include nulls" feature. I believe the best way to do it quickly would be to

    1. create one stream with your condition, returning only those <= ...
    2. create another stream with the null-condition, returning only those = nothing
    3. Merge these streams in your template

    note that I'm not sure if the null-condition actually works, maybe we should add this as a special value or operator or something - would appreciate your feedback

    if many people think a merge-stream datasource would be of value, post it as a request to the issues.