Field type queries

This page outlines some common queries you can perform on fields of the common field types.

General syntax

Use the following examples format for searching fields:

fieldname:value

Search a field by a value

fieldname:"value with spaces"

Search a field by a value containing spaces

fieldname:[value1,value2]

Show records with the field equal to any of these values

fieldname:~value

Search the field for words that sound like "value" on supported field

fieldname:>=value

For numbers and dates, use >, <, >= and <= operators for range searches

Status

See also: Status

Return all items with the status Requested. You can replace Requested for any status appropriate to the register you are searching in.

status:Requested

Return all items with that are in both the status Requested & In Progress. You can replace these statuses for any appropriate statuses to the register you are searching in.

status:["Requested","In Progress"]

Returns all inactive items (ie Resolved, Closed)

status:<0

ID

Search for a record by its record ID using text search:

19388

Record ID using id field name:

id:19388

Date

See also: Selecting Dates

When dealing with date fields you can use operators like greater than (>) or less than (<) to refine the search. To perform a range query, add the field twice to use each operator.

Search for items that were created since the start of 2019:

dateCreated:>=2019-01-01

The keyword "now" can be used as a shorthand for the current date and time.

Search for items that were updated within the past week:

dateUpdated:>=now-1w

Or, using days as a date unit:

dateUpdated:>=now-7d

Search for items that are overdue:

due:<now

Search for items that are due in the next week:

due:<=now+1w

Date shortcuts:

  • M is for months

  • m is for minutes

  • y is for years

  • w is for weeks

  • d is for days

  • now is for the current date and time

Tags

See also: Tagging items

Returns all items that have the tag “catering”

tags:catering(#catering)

Returns all items that are tagged with either “catering” or “communication”

tags:catering OR tags:communication(#catering OR #communication)

Returns all items that are tagged with both “catering” and “communication”

tags:catering AND tags:communication(#catering AND #communication)

Returns all items where no tags are set

tags:none

Returns all items where there are tags set for the item

tags:any

Assignment

See also: Assignment field

Will return all items that are unassigned (ie no assignment).

assigned:no

Will return all items that are assigned to any position.

assigned:yes

Will return all items that are assigned to the MEMO Deputy position. You can replace MEMO Deputy with any other position name to search.

assigned:"MEMO Deputy"

For registers where you assign to a user, you can perform the following search to return items assigned to your user

assigned:@me

Priority

The following searches will work in registers with a Priority field.

Return all items that are set as a high priority

priority:High

Return all items that are set to a low priority

priority:Low

Return all items that are set to a normal priority

priority:Normal

Return all items that are set to an urgent priority

priority:Urgent

See also: Related Items

For any register you can search on whether a related item has been set or not

For example, on the request register, you can search for items with applicants or no applicants by using the ‘none’ and ‘any’ terms.

Return requests that have no applicants:

applicant:none

Return requests were the applicant has been set:

applicant:any

You can also search for fields within the related records:

applicant:(firstName:Bob lastName:Down)

Media

See also: Attaching Files

For any register you can search on whether any of the media fields have media uploaded to them. For this you will need to know the name of the media field for the specific register you are searching on.

For example of the Recovery Cases register you can search for items have no photos uploaded into the Photos field:

photos:none

Similarly you can search for items where there are photos uploaded into the photos field:

photos:any

There is a second media field called Case Documents on the Recovery Case register. Similarly to the above example. you can search for items that have media in this field or no media in this field.

caseDocuments:none caseDocuments:any

Geospatial

See also: Location

The CQL language supports two geospatial operations:

  • intersects:<area> — returns records that touch the polygon defined by <area>

  • within:<area> — returns records that are wholly within the polygon defined by <area>

You can combine any of the search options with AND, OR , NOT etc with geospatial region(s).

intersects:yellowzone NOT intersects:redzone

Geography

For any register you can search on whether the item contains geography data or not with the any and none search options. Geography data can either come from drawing on the map or the asset linked to the item.

geo:none

geo:any

Within a predefine search area

Search areas can be created and managed in the Library, as “Geospatial Features” with the search feature enabled:

within:burnt-area-2020

Within another item

Additionally, any register item’s geometry can be used by simply specifying its numeric ID as the <area>.

This example shows searching one search area by its search reference (in this case, burnt-area-2020), and another by its direct ID.

within:burnt-area-2020 within:12345

Using WKT

Additionally, geospatial search areas can be defined using the geospatial WKT standard, wrapped in quotes:

intersects:"POLYGON((147.71232605287 -37.726696954216,147.70632098464 -37.722447990386,147.70980670525 -37.721037320531,147.71232605287 -37.726696954216))"

WKT stands for “Well Known Text”, and most GIS systems allow polygons to be copied as WKT.

Last updated

Was this helpful?