- 14 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Using Operators in the Query Wizard
- Updated on 14 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
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:
Operators for Text Fields
'contains', 'equals', 'in', 'starts', 'ends' and 'regex' functions, all refer to a text value to compare to.
In Values
Two sorts of In values are available. regular in 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' values are case insensitive.
Operators for Numeric Fields
'equals', '>' (greater) and '<' (lesser) functions, all refer to a numeric value to compare to.
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', '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.
Operators for Version Fields
'contains', 'equals', 'regex', 'earlier than', 'later than' functions, all refer to a version value to compare to.
Operators for Enumerated Fields
'equals' function along with a selection of a values from a list of pre-defined values.