☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation

ConditionalQueryObject

Refers to the filter by condition for number, string, date, and time fields. Check if the conditional filter is supported for your data source in Flexmonster’s technical specifications

Properties

Available properties depend on the field’s type. Only one property can be specified at a time.

Note MDX queries are not supported by the conditional filter. Use only the properties described in this section.

Number

Property/TypeDescription
equal
Number
Returns numbers equal to the specified number.
Example: { "equal": 5 }.
not_equal
Number
Returns numbers not equal to the specified number.
Example: { "not_equal": 5 }.
greater
Number
Returns numbers greater than the specified number.
Example: { "greater": 5 }.
greater_equal
Number
Returns numbers greater than or equal to the specified number.
Example: { "greater_equal": 5 }.
less
Number
Returns numbers less than the specified number.
Example: { "less": 5 }.
less_equal
Number
Returns numbers less than or equal to the specified number.
Example: { "less_equal": 5 }.
between
Number[]
Returns numbers between the specified numbers (including them).
Example: { "between": [0, 5] }.
not_between
Number[]
Returns numbers not between the specified numbers (excluding them).
Example: { "not_between": [0, 5] }.

String

Property/TypeDescription
equal
String
Returns strings equal to the specified string.
Example: { "equal": "aaa" }.
not_equal
String
Returns strings not equal to the specified string.
Example: { "not_equal": "aaa" }.
begin
String
Returns strings that begin with the specified string.
Example: { "begin": "aaa" }.
not_begin
String
Returns strings that do not begin with the specified string.
Example: { "not_begin": "aaa" }.
end
String
Returns strings that end with the specified string.
Example: { "end": "aaa" }.
not_end
String
Returns strings that do not end with the specified string.
Example: { "not_end": "aaa" }.
contain
String
Returns strings that contain the specified string.
Example: { "contain": "aaa" }.
not_contain
String
Returns strings that do not contain the specified string.
Example: { "not_contain": "aaa" }.
greater
String
Returns strings greater than the specified string.
Example: { "greater": "aaa" }.
greater_equal
String
Returns strings greater than or equal to the specified string.
Example: { "greater_equal": "aaa" }.
less
String
Returns strings less than the specified string.
Example: { "less": "aaa" }.
less_equal
String
Returns strings less than or equal to the specified string.
Example: { "less_equal": "aaa" }.
between
String[]
Returns strings between the specified strings (including them).
Example: { "between": ["aaa", "bbb"] }.
not_between
String[]
Returns strings not between the specified strings (excluding them).
Example: { "not_between": ["aaa", "bbb"] }.

Date

The filter accepts dates in the "YYYY-MM-DD" format. 

Note The filter does not work for the "date" field type. Fields of this type can be filtered only with selection or value filters.

Property/TypeDescription
equal
String
Returns dates equal to the specified date.
Example: { "equal": "2018-12-31" }.
not_equal
String
Returns dates not equal to the specified date.
Example: { "not_equal": "2018-12-31" }.
before
String
Returns dates before the specified date.
Example: { "before": "2018-12-31" }.
before_equal
String
Returns dates before or equal to the specified date.
Example: { "before_equal": "2018-12-31" }.
after
String
Returns dates after the specified date.
Example: { "after": "2018-12-31" }.
after_equal
String
Returns dates after or equal to the specified date.
Example: { "after_equal": "2018-12-31" }.
between
String[]
Returns dates between the specified dates (including them).
Example: { "between": ["2018-12-31", "2018-12-31"] }.
not_between
String[]
Returns dates not between the specified dates (excluding them).
Example: { "not_between": ["2018-12-31", "2018-12-31"] }.
last
String
Returns dates of a previous period. The period can be one of the following: "day", "week", "month", "quarter", "year".
Example: { "last": "week" }.
current
String
Returns dates of a current period. The period can be one of the following: "day", "week", "month", "quarter", "year".
Example: { "current": "week" }.
next
String
Returns dates of a next period. The period can be one of the following: "day", "week", "month", "quarter", "year".
Example: { "next": "week" }.

Time

The filter accepts time periods in the following formats:

  • "Xs" – X seconds. Example: "5s".
  • "Xm" – X minutes. Example: "5m".
  • "Xh" – X hours. Example: "5h".
  • "Xd" – X days. Example: "5d".
Property/TypeDescription
equal
String
Returns time periods equal to the specified time period.
Example: { "equal": "30m" }.
not_equal
String
Returns time periods not equal to the specified time period.
Example: { "not_equal": "30m" }.
greater
String
Returns time periods greater than the specified time period.
Example: { "greater": "30m" }.
greater_equal
String
Returns time periods greater than or equal to the specified time period.
Example: { "greater_equal": "30m" }.
less
String
Returns time periods less than the specified time period.
Example: { "less": "30m" }.
less_equal
String
Returns time periods less than or equal to the specified time period.
Example: { "less_equal": "30m" }.
between
String[]
Returns time periods between the specified time periods (including them).
Example: { "between": ["30m", "1h"] }.
not_between
String[]
Returns time periods not between the specified time periods (excluding them).
Example: { "not_between": ["30m", "1h"] }.

Example

The example below shows how the ConditionalQueryObject is used to create a conditional filter for a string field:

slice: {
  rows: [
    {
      uniqueName: "Country",
      filter: {
        query: {
          begin: "U",
        },
      },
    },
  ]
}

Live example

See also

Filter by condition
FilterObject
setFilter()
clearFilter()