Using Operators in the Query Wizard
  • 10 Nov 2024
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Using Operators in the Query Wizard

  • Dark
    Light
  • PDF

Article summary

You can use various operators in the Query Wizard. The operators available depend on the field type.
Once a field is selected, you need to select a comparison function from a drop-down list. For each field type there is a list of possible functions:
Some available operators are listed here:

Note:
Use the 'exists' function to filter the existence of any property value, it is available for all field types.

SelectOperators

Operators for Text Fields

'contains', 'equals', 'in', 'starts', 'ends' and 'regex' functions, all refer to a text value to compare to.

TExtOperators

Note

By default, the regex operator is not case sensitive in searching the query expression. To make the query case sensitive add (?-i) to the regex query expression, for example:
regex_example

In Operators

Three sorts of In values are available. in (equals), in (contains) or in (plain text). For more information, see Adding Multiple Values to Query Expressions. The system limits the number of assets fetched using the 'in' operator. When the limit is exceeded, an error message is displayed. Note that in (equals) and in (plain text) values are case sensitive.

Note:
A single query expression using the in (equals) or in (contains), function can replace multiple query expressions using the 'equals' or 'contains' function with 'or' operands between them.

Operators for Numeric Fields

'equals', '>' (greater) and '<' (lesser) functions, all refer to a numeric value to compare to.

Note:
The Adapter Connections field has unique actions to filter by the number of the adapters: 'count =', 'count <', 'count >'

Operators for Date Fields

'>' (after), '<' (before),'=' (is) 'last days', 'next days', 'next days from now', 'last hours', 'next hours', 'next hours from now' 'previous weeks' 'previous months' and 'current month' functions, all refer to a date expression to compare to.

  • Use date expressions as follows:
    • '=', '<' or '>' the value to compare is a chosen calendar date expression.
    • 'last days', 'next days' and 'next days from now' the value to compare to is the relative number of days (integer).
    • 'last hours', 'next hours' and 'next hours from now' the value to compare to is the relative number of hours (integer).
    • 'previous weeks' queries assets from the selected number of weeks since the previous Monday. For example, if today is Wednesday and you select to query for 1 previous week, the query returns values from two Mondays ago until the past Monday (two days ago).
    • ‘previous months’ the value to compare to is the previous X calendar months. For instance, when you are in the month of June and choose ‘previous 3 months’ the query will either fetch assets which fulfill the query for the months of March, April, and May, or if you choose NOT, will not fetch values for those months.
    • ‘current month’ the value to compare to the current calendar month.

Operators for IP Address Fields

  • 'size', 'exists', 'in subnet', 'not in subnet', 'contains', 'regex', 'equals', 'starts', 'isIPv4' and 'isIPv6' functions, all refer to an IP address value to compare to.
  • For 'in subnet', 'not in subnet', you can specify multiple comma separated subnets.
  • Count '=', '<' or '>' enables a numeric value for the number of IP addresses to compare to.
  • For 'size', enter a number that represents the number of values the asset has from the queried field. For example, you can query for the Preferred IPv6 field with a 'size' operator of [12], and this will return assets with a list of 12 IPv6 addresses.
  • For 'starts', enter a value that the IP address starts with.

Operators for Version Fields

'contains', 'equals', 'regex', 'earlier than', 'later than' functions, all refer to a version value to compare to.

Note:
The OS: Distribution field has unique actions to filter devices with Windows, MAC or iOS versions lower or higher than the compared version: '<', '>'

Operators for Enumerated Fields

'equals' function along with a selection of a values from a list of pre-defined values.


Was this article helpful?