> For the complete documentation index, see [llms.txt](https://docs.cw.crisisworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cw.crisisworks.com/security-and-support/technical-reference/cql-reference/cql-examples.md).

# CQL Examples

### Introduction

* `123` Find record by ID
* `any words` Find record containing these words
* `"this phrase"` Find record containing these words in order
* `word*` Find record containing words starting with `word`: `wordsmith`, `wordplay`, `wordless`
* `fieldname:value` Find records where `fieldname = value`
* `#my-tag` Find records tagged with `#my-tag`

### Field Filtering

* `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` (supported fields only)
* `fieldname:>=value` For numbers and dates, use `>`, `<`, `>=` and `<=` for range searches

### AND, OR and NOT

* `red OR green` Return records having either `red` or `green`
* `red NOT apple` Return records having `red` but not `apple`
* `(title:"red apple" AND body:"quick fox") OR title:fox` Use parentheses to express complex logic

### Special fields

* `@me` Find records assigned to you
* `assigned:bob@example.com` Find records assigned to Bob
* `assigned:"Police Liaison"` Find records assigned to the position named `Police Liaison`
* `is:active` Find active records
* `is:due` Find overdue records

### Filters Reference

### additionalinfo: Search the contents of additionalInfo (string)

* `additionalinfo:some additionalinfo:words` These words are in any order within `additionalinfo`
* `additionalinfo:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `additionalinfo`
* `additionalinfo:"a phrase"` This phrase is in `additionalinfo`

### agriculture: Related to Agriculture (related)

* `agriculture:(id:123)` Search the related record by related record ID `123`
* `agriculture:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:agriculture` Filter records where `agriculture` is set to any value
* `hasnt:agriculture` Filter records where `agriculture` is not set

### applicant: Related to Persons (related)

* `applicant:(id:123)` Search the related record by related record ID `123`
* `applicant:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:applicant` Filter records where `applicant` is set to any value
* `hasnt:applicant` Filter records where `applicant` is not set

### asset: The related asset code or id (id)

* `asset:word` Filter records related to Asset containing `word` in its title
* `asset:123` Filter records related to Asset with the ID `123`
* `has:asset` Filter records where `asset` is set to any value
* `hasnt:asset` Filter records where `asset` is not set

### assetid: Search the contents of assetId (string)

* `assetid:some assetid:words` These words are in any order within `assetid`
* `assetid:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `assetid`
* `assetid:"a phrase"` This phrase is in `assetid`

### assigned: Assigned to participant (assignment)

* `assigned:value` Filter on a specific value of `assigned`
* `has:assigned` Filter records where `assigned` is set to any value
* `hasnt:assigned` Filter records where `assigned` is not set

### assignee: Assigned via Case Officer (assignment)

* `assignee:value` Filter on a specific value of `assignee`
* `has:assignee` Filter records where `assignee` is set to any value
* `hasnt:assignee` Filter records where `assignee` is not set

### atsiorigin: Search the contents of ATSIOrigin (enum)

* `atsiorigin:value` Filter records with `atsiorigin` set to `value`
* `atsiorigin:[value1,value2]` Filter records with `atsiorigin` set to any specified value
* `has:atsiorigin` Filter records where `atsiorigin` is set to any value
* `hasnt:atsiorigin` Filter records where `atsiorigin` is not set

This field has a defined set of values:

* `yes` Yes
* `no` No
* `preferNotToSay` Prefer not to say
* `notYetAsked` Not asked yet

### attachment: Has attachment (media)

* `has:attachment` Filter records where `attachment` is set to any value
* `hasnt:attachment` Filter records where `attachment` is not set

### casedocuments: An attachment (media)

* `has:casedocuments` Filter records where `casedocuments` is set to any value
* `hasnt:casedocuments` Filter records where `casedocuments` is not set

### damageinfo: Search the contents of damageInfo (string)

* `damageinfo:some damageinfo:words` These words are in any order within `damageinfo`
* `damageinfo:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `damageinfo`
* `damageinfo:"a phrase"` This phrase is in `damageinfo`

### dateclosed: The first transition date and time to Closed (timestamp)

* `dateclosed:<now-30d` Is less than 30 days from now
* `dateclosed:2026-12-31` Is the date `2026-12-31`
* `dateclosed:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateclosed:>2026-01-01 AND dateclosed:<2026-12-31` Is in the year `2026`
* `dateclosed:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateclosed` Filter records where `dateclosed` is set to any value
* `hasnt:dateclosed` Filter records where `dateclosed` is not set

### dateclosedduplicate: The first transition date and time to Closed (Duplicate) (timestamp)

* `dateclosedduplicate:<now-30d` Is less than 30 days from now
* `dateclosedduplicate:2026-12-31` Is the date `2026-12-31`
* `dateclosedduplicate:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateclosedduplicate:>2026-01-01 AND dateclosedduplicate:<2026-12-31` Is in the year `2026`
* `dateclosedduplicate:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateclosedduplicate` Filter records where `dateclosedduplicate` is set to any value
* `hasnt:dateclosedduplicate` Filter records where `dateclosedduplicate` is not set

### dateclosederror: The first transition date and time to Closed (Error) (timestamp)

* `dateclosederror:<now-30d` Is less than 30 days from now
* `dateclosederror:2026-12-31` Is the date `2026-12-31`
* `dateclosederror:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateclosederror:>2026-01-01 AND dateclosederror:<2026-12-31` Is in the year `2026`
* `dateclosederror:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateclosederror` Filter records where `dateclosederror` is set to any value
* `hasnt:dateclosederror` Filter records where `dateclosederror` is not set

### datecreated: The date and time the record was initially created (timestamp)

* `datecreated:<now-30d` Is less than 30 days from now
* `datecreated:2026-12-31` Is the date `2026-12-31`
* `datecreated:<2026-12-31` Is earlier than the date `2026-12-31`
* `datecreated:>2026-01-01 AND datecreated:<2026-12-31` Is in the year `2026`
* `datecreated:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datecreated` Filter records where `datecreated` is set to any value
* `hasnt:datecreated` Filter records where `datecreated` is not set

### datedraft: The first transition date and time to Draft (timestamp)

* `datedraft:<now-30d` Is less than 30 days from now
* `datedraft:2026-12-31` Is the date `2026-12-31`
* `datedraft:<2026-12-31` Is earlier than the date `2026-12-31`
* `datedraft:>2026-01-01 AND datedraft:<2026-12-31` Is in the year `2026`
* `datedraft:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datedraft` Filter records where `datedraft` is set to any value
* `hasnt:datedraft` Filter records where `datedraft` is not set

### dateinspectionrequired: The first transition date and time to Inspection Required (timestamp)

* `dateinspectionrequired:<now-30d` Is less than 30 days from now
* `dateinspectionrequired:2026-12-31` Is the date `2026-12-31`
* `dateinspectionrequired:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateinspectionrequired:>2026-01-01 AND dateinspectionrequired:<2026-12-31` Is in the year `2026`
* `dateinspectionrequired:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateinspectionrequired` Filter records where `dateinspectionrequired` is set to any value
* `hasnt:dateinspectionrequired` Filter records where `dateinspectionrequired` is not set

### datenew: The first transition date and time to New (timestamp)

* `datenew:<now-30d` Is less than 30 days from now
* `datenew:2026-12-31` Is the date `2026-12-31`
* `datenew:<2026-12-31` Is earlier than the date `2026-12-31`
* `datenew:>2026-01-01 AND datenew:<2026-12-31` Is in the year `2026`
* `datenew:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datenew` Filter records where `datenew` is set to any value
* `hasnt:datenew` Filter records where `datenew` is not set

### datenoactionrequired: The first transition date and time to No Action Required (timestamp)

* `datenoactionrequired:<now-30d` Is less than 30 days from now
* `datenoactionrequired:2026-12-31` Is the date `2026-12-31`
* `datenoactionrequired:<2026-12-31` Is earlier than the date `2026-12-31`
* `datenoactionrequired:>2026-01-01 AND datenoactionrequired:<2026-12-31` Is in the year `2026`
* `datenoactionrequired:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datenoactionrequired` Filter records where `datenoactionrequired` is set to any value
* `hasnt:datenoactionrequired` Filter records where `datenoactionrequired` is not set

### dateopen: The first transition date and time to Open (timestamp)

* `dateopen:<now-30d` Is less than 30 days from now
* `dateopen:2026-12-31` Is the date `2026-12-31`
* `dateopen:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateopen:>2026-01-01 AND dateopen:<2026-12-31` Is in the year `2026`
* `dateopen:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateopen` Filter records where `dateopen` is set to any value
* `hasnt:dateopen` Filter records where `dateopen` is not set

### datereopen: The first transition date and time to Reopen (timestamp)

* `datereopen:<now-30d` Is less than 30 days from now
* `datereopen:2026-12-31` Is the date `2026-12-31`
* `datereopen:<2026-12-31` Is earlier than the date `2026-12-31`
* `datereopen:>2026-01-01 AND datereopen:<2026-12-31` Is in the year `2026`
* `datereopen:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datereopen` Filter records where `datereopen` is set to any value
* `hasnt:datereopen` Filter records where `datereopen` is not set

### dateresolved: The first transition date and time to Resolved (timestamp)

* `dateresolved:<now-30d` Is less than 30 days from now
* `dateresolved:2026-12-31` Is the date `2026-12-31`
* `dateresolved:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateresolved:>2026-01-01 AND dateresolved:<2026-12-31` Is in the year `2026`
* `dateresolved:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateresolved` Filter records where `dateresolved` is set to any value
* `hasnt:dateresolved` Filter records where `dateresolved` is not set

### datereview: The first transition date and time to Review (timestamp)

* `datereview:<now-30d` Is less than 30 days from now
* `datereview:2026-12-31` Is the date `2026-12-31`
* `datereview:<2026-12-31` Is earlier than the date `2026-12-31`
* `datereview:>2026-01-01 AND datereview:<2026-12-31` Is in the year `2026`
* `datereview:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datereview` Filter records where `datereview` is set to any value
* `hasnt:datereview` Filter records where `datereview` is not set

### datetemplate: The first transition date and time to Template (timestamp)

* `datetemplate:<now-30d` Is less than 30 days from now
* `datetemplate:2026-12-31` Is the date `2026-12-31`
* `datetemplate:<2026-12-31` Is earlier than the date `2026-12-31`
* `datetemplate:>2026-01-01 AND datetemplate:<2026-12-31` Is in the year `2026`
* `datetemplate:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:datetemplate` Filter records where `datetemplate` is set to any value
* `hasnt:datetemplate` Filter records where `datetemplate` is not set

### dateupdated: The date and time the record was last updated (timestamp)

* `dateupdated:<now-30d` Is less than 30 days from now
* `dateupdated:2026-12-31` Is the date `2026-12-31`
* `dateupdated:<2026-12-31` Is earlier than the date `2026-12-31`
* `dateupdated:>2026-01-01 AND dateupdated:<2026-12-31` Is in the year `2026`
* `dateupdated:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:dateupdated` Filter records where `dateupdated` is set to any value
* `hasnt:dateupdated` Filter records where `dateupdated` is not set

### details: Search the contents of details (string)

* `details:some details:words` These words are in any order within `details`
* `details:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `details`
* `details:"a phrase"` This phrase is in `details`

### eventid: Search the contents of eventId (string)

* `eventid:some eventid:words` These words are in any order within `eventid`
* `eventid:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `eventid`
* `eventid:"a phrase"` This phrase is in `eventid`

### externalid: An imported record's original record ID (number)

* `externalid:value` Filter on a specific value of `externalid`
* `has:externalid` Filter records where `externalid` is set to any value
* `hasnt:externalid` Filter records where `externalid` is not set

### externalsource: An imported record's source (string)

* `externalsource:some externalsource:words` These words are in any order within `externalsource`
* `externalsource:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `externalsource`
* `externalsource:"a phrase"` This phrase is in `externalsource`

### fieldofficer: Assigned via Field Officer (assignment)

* `fieldofficer:value` Filter on a specific value of `fieldofficer`
* `has:fieldofficer` Filter records where `fieldofficer` is set to any value
* `hasnt:fieldofficer` Filter records where `fieldofficer` is not set

### fixedhomeaddress: Search the contents of fixedHomeAddress (enum)

* `fixedhomeaddress:value` Filter records with `fixedhomeaddress` set to `value`
* `fixedhomeaddress:[value1,value2]` Filter records with `fixedhomeaddress` set to any specified value
* `has:fixedhomeaddress` Filter records where `fixedhomeaddress` is set to any value
* `hasnt:fixedhomeaddress` Filter records where `fixedhomeaddress` is not set

This field has a defined set of values:

* `no` No property within municipality
* `yes` Add a property within the municipality

### geo: Filter records within a search area (geo)

* `within:my-search-area` Filter records fully within the defined `my-search-area` geometry
* `within:"WKT"` Filter records within a geometry specified by Well Known Text (WKT)
* `not within:my-search-area` Filter records fully outside of the nominated search area
* `intersects:my-search-area` Filter records that are fully or partly within the defined `my-search-area` geometry
* `has:geo` Filter records where `geo` is set to any value
* `hasnt:geo` Filter records where `geo` is not set

### id: The ID of the record (number)

* `id:123` Returns just record by its ID `123`

### importdata: Search the contents of importData (string)

* `importdata:some importdata:words` These words are in any order within `importdata`
* `importdata:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `importdata`
* `importdata:"a phrase"` This phrase is in `importdata`

### insurance: Search the contents of insurance (string)

* `insurance:some insurance:words` These words are in any order within `insurance`
* `insurance:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `insurance`
* `insurance:"a phrase"` This phrase is in `insurance`

### intersects: Filter records within a search area (geo)

* `within:my-search-area` Filter records fully within the defined `my-search-area` geometry
* `within:"WKT"` Filter records within a geometry specified by Well Known Text (WKT)
* `not within:my-search-area` Filter records fully outside of the nominated search area
* `intersects:my-search-area` Filter records that are fully or partly within the defined `my-search-area` geometry
* `has:intersects` Filter records where `intersects` is set to any value
* `hasnt:intersects` Filter records where `intersects` is not set

### is: Convenient shortcuts (enum)

* `is:value` Filter records with `is` set to `value`
* `is:[value1,value2]` Filter records with `is` set to any specified value
* `has:is` Filter records where `is` is set to any value
* `hasnt:is` Filter records where `is` is not set

This field has a defined set of values:

* `any` Is Any
* `active` Is Active

### isapplicantknown: Search the contents of isApplicantKnown (enum)

* `isapplicantknown:value` Filter records with `isapplicantknown` set to `value`
* `isapplicantknown:[value1,value2]` Filter records with `isapplicantknown` set to any specified value
* `has:isapplicantknown` Filter records where `isapplicantknown` is set to any value
* `hasnt:isapplicantknown` Filter records where `isapplicantknown` is not set

This field has a defined set of values:

* `unknown` The affected person(s) are unknown
* `known` The affected person(s) or organisation are known

### iselasticsearchindexingenabledforasset: A search area (boolean)

* `iselasticsearchindexingenabledforasset:true` `iselasticsearchindexingenabledforasset` is true
* `iselasticsearchindexingenabledforasset:false` `iselasticsearchindexingenabledforasset` is false

### issearcharea: A search area (boolean)

* `issearcharea:true` `issearcharea` is true
* `issearcharea:false` `issearcharea` is false

### istemplate: Search for only templates (boolean)

* `istemplate:true` `istemplate` is true
* `istemplate:false` `istemplate` is false

### itemschemaname: The schema name (enum)

* `itemschemaname:value` Filter records with `itemschemaname` set to `value`
* `itemschemaname:[value1,value2]` Filter records with `itemschemaname` set to any specified value
* `has:itemschemaname` Filter records where `itemschemaname` is set to any value
* `hasnt:itemschemaname` Filter records where `itemschemaname` is not set

This field has a defined set of values:

* `v202001` Registration 2020

### livestock: Related to Livestock (related)

* `livestock:(id:123)` Search the related record by related record ID `123`
* `livestock:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:livestock` Filter records where `livestock` is set to any value
* `hasnt:livestock` Filter records where `livestock` is not set

### name: Search the contents of name (string)

* `name:some name:words` These words are in any order within `name`
* `name:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `name`
* `name:"a phrase"` This phrase is in `name`

### othertype: Search the contents of otherType (string)

* `othertype:some othertype:words` These words are in any order within `othertype`
* `othertype:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `othertype`
* `othertype:"a phrase"` This phrase is in `othertype`

### photos: An attachment (media)

* `has:photos` Filter records where `photos` is set to any value
* `hasnt:photos` Filter records where `photos` is not set

### priority: Priority (enum)

* `priority:value` Filter records with `priority` set to `value`
* `priority:[value1,value2]` Filter records with `priority` set to any specified value
* `has:priority` Filter records where `priority` is set to any value
* `hasnt:priority` Filter records where `priority` is not set

This field has a defined set of values:

* `0` None
* `1` Low
* `2` Normal
* `3` High
* `4` Urgent

### privateassets: Related to Private Assets (related)

* `privateassets:(id:123)` Search the related record by related record ID `123`
* `privateassets:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:privateassets` Filter records where `privateassets` is set to any value
* `hasnt:privateassets` Filter records where `privateassets` is not set

### propertydamage: Search the contents of propertyDamage (enum)

* `propertydamage:value` Filter records with `propertydamage` set to `value`
* `propertydamage:[value1,value2]` Filter records with `propertydamage` set to any specified value
* `has:propertydamage` Filter records where `propertydamage` is set to any value
* `hasnt:propertydamage` Filter records where `propertydamage` is not set

This field has a defined set of values:

* `no` No
* `unsure` Damage is possible and requires inspection/followup
* `yes` Damage has been confirmed

### propertyinsured: Search the contents of propertyInsured (enum)

* `propertyinsured:value` Filter records with `propertyinsured` set to `value`
* `propertyinsured:[value1,value2]` Filter records with `propertyinsured` set to any specified value
* `has:propertyinsured` Filter records where `propertyinsured` is set to any value
* `hasnt:propertyinsured` Filter records where `propertyinsured` is not set

This field has a defined set of values:

* `no` No
* `yes` Yes
* `unknown` Unknown

### propertyuseaccommodation: Search the contents of propertyUseAccommodation (boolean)

* `propertyuseaccommodation:true` `propertyuseaccommodation` is true
* `propertyuseaccommodation:false` `propertyuseaccommodation` is false

### propertyusecommercial: Search the contents of propertyUseCommercial (boolean)

* `propertyusecommercial:true` `propertyusecommercial` is true
* `propertyusecommercial:false` `propertyusecommercial` is false

### propertyusecommunity: Search the contents of propertyUseCommunity (boolean)

* `propertyusecommunity:true` `propertyusecommunity` is true
* `propertyusecommunity:false` `propertyusecommunity` is false

### propertyusefarm: Search the contents of propertyUseFarm (boolean)

* `propertyusefarm:true` `propertyusefarm` is true
* `propertyusefarm:false` `propertyusefarm` is false

### propertyusegovernment: Search the contents of propertyUseGovernment (boolean)

* `propertyusegovernment:true` `propertyusegovernment` is true
* `propertyusegovernment:false` `propertyusegovernment` is false

### propertyuseinfrastructure: Search the contents of propertyUseInfrastructure (boolean)

* `propertyuseinfrastructure:true` `propertyuseinfrastructure` is true
* `propertyuseinfrastructure:false` `propertyuseinfrastructure` is false

### propertyuseother: Search the contents of propertyUseOther (boolean)

* `propertyuseother:true` `propertyuseother` is true
* `propertyuseother:false` `propertyuseother` is false

### propertyuseresidential: Search the contents of propertyUseResidential (boolean)

* `propertyuseresidential:true` `propertyuseresidential` is true
* `propertyuseresidential:false` `propertyuseresidential` is false

### propertyuseresidentialprimary: Search the contents of propertyUseResidentialPrimary (boolean)

* `propertyuseresidentialprimary:true` `propertyuseresidentialprimary` is true
* `propertyuseresidentialprimary:false` `propertyuseresidentialprimary` is false

### propertyuseresidentialsecondary: Search the contents of propertyUseResidentialSecondary (boolean)

* `propertyuseresidentialsecondary:true` `propertyuseresidentialsecondary` is true
* `propertyuseresidentialsecondary:false` `propertyuseresidentialsecondary` is false

### propertyuseresidentialunclassified: Search the contents of propertyUseResidentialUnclassified (boolean)

* `propertyuseresidentialunclassified:true` `propertyuseresidentialunclassified` is true
* `propertyuseresidentialunclassified:false` `propertyuseresidentialunclassified` is false

### propertyusevacant: Search the contents of propertyUseVacant (boolean)

* `propertyusevacant:true` `propertyusevacant` is true
* `propertyusevacant:false` `propertyusevacant` is false

### recoveryenvironmentalhealth: Related to Environmental Health (related)

* `recoveryenvironmentalhealth:(id:123)` Search the related record by related record ID `123`
* `recoveryenvironmentalhealth:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:recoveryenvironmentalhealth` Filter records where `recoveryenvironmentalhealth` is set to any value
* `hasnt:recoveryenvironmentalhealth` Filter records where `recoveryenvironmentalhealth` is not set

### referraldate: Date field (date)

* `referraldate:<now-30d` Is less than 30 days from now
* `referraldate:2026-12-31` Is the date `2026-12-31`
* `referraldate:<2026-12-31` Is earlier than the date `2026-12-31`
* `referraldate:>2026-01-01 AND referraldate:<2026-12-31` Is in the year `2026`
* `referraldate:<"2026-12-31 12:31:00"` Is before `2026-12-31 12:31:00` (your local timezone)
* `has:referraldate` Filter records where `referraldate` is set to any value
* `hasnt:referraldate` Filter records where `referraldate` is not set

### referralsource: Filter by lookup value (enum)

* `referralsource:value` Filter records with `referralsource` set to `value`
* `referralsource:[value1,value2]` Filter records with `referralsource` set to any specified value
* `has:referralsource` Filter records where `referralsource` is set to any value
* `hasnt:referralsource` Filter records where `referralsource` is not set

This field has a defined set of values:

* `centrelink` Centrelink
* `dhhs` DHHS
* `FRV` FRV
* `icc` Incident Control Centre
* `other` Other
* `red-ross` Red Cross
* `self-referred` Self-referred
* `scc` State Control Centre
* `vcc` Victorian Council of Churches

### region: The region code (enum)

* `region:value` Filter records with `region` set to `value`
* `region:[value1,value2]` Filter records with `region` set to any specified value
* `has:region` Filter records where `region` is set to any value
* `hasnt:region` Filter records where `region` is not set

This field has a defined set of values:

* `none` No Region
* `ALPINESHIRE` Alpine
* `BAWBAWSHIRE` Baw Baw
* `WANGARATTA` Wangaratta

### regionid: The region code (enum)

* `regionid:value` Filter records with `regionid` set to `value`
* `regionid:[value1,value2]` Filter records with `regionid` set to any specified value
* `has:regionid` Filter records where `regionid` is set to any value
* `hasnt:regionid` Filter records where `regionid` is not set

This field has a defined set of values:

* `none` No Region
* `ALPINESHIRE` Alpine
* `BAWBAWSHIRE` Baw Baw
* `WANGARATTA` Wangaratta

### relatedassessmentswithsameasset: Related to Assessments (related)

* `relatedassessmentswithsameasset:(id:123)` Search the related record by related record ID `123`
* `relatedassessmentswithsameasset:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:relatedassessmentswithsameasset` Filter records where `relatedassessmentswithsameasset` is set to any value
* `hasnt:relatedassessmentswithsameasset` Filter records where `relatedassessmentswithsameasset` is not set

### relatedcontacts: Related to Persons (related)

* `relatedcontacts:(id:123)` Search the related record by related record ID `123`
* `relatedcontacts:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:relatedcontacts` Filter records where `relatedcontacts` is set to any value
* `hasnt:relatedcontacts` Filter records where `relatedcontacts` is not set

### relatedreliefregistrations: Related to Relief Registration (related)

* `relatedreliefregistrations:(id:123)` Search the related record by related record ID `123`
* `relatedreliefregistrations:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:relatedreliefregistrations` Filter records where `relatedreliefregistrations` is set to any value
* `hasnt:relatedreliefregistrations` Filter records where `relatedreliefregistrations` is not set

### relationshiptoproperty: Filter by lookup value (enum)

* `relationshiptoproperty:value` Filter records with `relationshiptoproperty` set to `value`
* `relationshiptoproperty:[value1,value2]` Filter records with `relationshiptoproperty` set to any specified value
* `has:relationshiptoproperty` Filter records where `relationshiptoproperty` is set to any value
* `hasnt:relationshiptoproperty` Filter records where `relationshiptoproperty` is not set

This field has a defined set of values:

* `guest` Guest
* `other` Other
* `owner` Owner
* `tenant` Tenant
* `worker` Worker

### schema: The schema name (enum)

* `schema:value` Filter records with `schema` set to `value`
* `schema:[value1,value2]` Filter records with `schema` set to any specified value
* `has:schema` Filter records where `schema` is set to any value
* `hasnt:schema` Filter records where `schema` is not set

This field has a defined set of values:

* `v202001` Registration 2020

### sharinglevel: Search the contents of sharingLevel (enum)

* `sharinglevel:value` Filter records with `sharinglevel` set to `value`
* `sharinglevel:[value1,value2]` Filter records with `sharinglevel` set to any specified value
* `has:sharinglevel` Filter records where `sharinglevel` is set to any value
* `hasnt:sharinglevel` Filter records where `sharinglevel` is not set

This field has a defined set of values:

* `notYetAsked` Primary contact(s) have not yet been asked
* `none` Do not share my details
* `full` Share my full details with other agencies for use in recovery

### status: The status code or value (enum)

* `status:inspect` Return records with `Inspection Required` status
* `status:[inspect,new]` Return records in any of the nominated statuses
* `is:active` Return records having active statuses (`inspect`, `new`, `open_no_action`, `open`, `reopen`, `review`)
* `is:inactive` Return records having inactive statuses

This field has a defined set of values:

* `closed` Closed
* `cw_closed_duplicate` Closed (Duplicate)
* `cw_closed_error` Closed (Error)
* `cw_draft_from_template` Draft
* `inspect` Inspection Required
* `new` New
* `open_no_action` No Action Required
* `open` Open
* `reopen` Reopen
* `resolved` Resolved
* `review` Review
* `cw_template` Template

### systemclassification: Filter by lookup value (multiselect)

* `systemclassification:value` Filter on a specific value of `systemclassification`
* `has:systemclassification` Filter records where `systemclassification` is set to any value
* `hasnt:systemclassification` Filter records where `systemclassification` is not set

### tags: Tags that have been attached to the record (tags)

* `#foo` Return all records tagged with `foo`
* `#"Tag With Spaces"` Search for records tagged with tags containing spaces
* `#foo NOT #bar` Return all records tagged with `foo` but not `bar`

This field has a defined set of values:

* `accom-animals` Tag value
* `activity` Tag value
* `address_invalid` Tag value
* `advice` Tag value
* `allergies` Tag value
* `anamleas` Tag value
* `animal-care` Tag value
* `animal-management` Tag value
* `animals` Tag value
* `animal_aterc` Tag value
* `animal_management` Tag value
* `any-old-tag` Tag value
* `authority` Tag value
* `bcp` Tag value
* `building` Tag value
* `bushfire` Tag value
* `cat` Tag value
* `catering` Tag value
* `child_under_15` Tag value
* `coffee` Tag value
* `coffee_lover` Tag value
* `corporate` Tag value
* `damaged` Tag value
* `damage_other_structures` Tag value
* `dog` Tag value
* `dogs` Tag value
* `em-guidelines` Tag value
* `emergency` Tag value
* `emergencyateam` Tag value
* `emlo` Tag value
* `engineering` Tag value
* `erc` Tag value
* `erc-assessment-built` Tag value
* `erc-assessment-economic` Tag value
* `erc-assessment-natural` Tag value
* `erc-assessment-social` Tag value
* `erc-hobsons` Tag value
* `erc-patterson` Tag value
* `erc-primary` Tag value
* `erc-secondary` Tag value
* `erc-update` Tag value
* `fallen-tree` Tag value
* `fallen_tree` Tag value
* `family` Tag value
* `field_mapping` Tag value
* `fire` Tag value
* `firstlog` Tag value
* `fleet` Tag value
* `flood` Tag value
* `flood-off` Tag value
* `flooding` Tag value
* `follow_up` Tag value
* `food` Tag value
* `food_relief` Tag value
* `from-assessment-2025-09-25` Tag value
* `from-assessment-2026-01-23` Tag value
* `from-assessment-2026-01-27` Tag value
* `from-assessment-2026-01-29` Tag value
* `from-assessment-2026-02-02` Tag value
* `from-cogb` Tag value
* `frv-mock-data` Tag value
* `gas-leak` Tag value
* `gluten-free` Tag value
* `hazard` Tag value
* `health-and-safety` Tag value
* `house_destroyed` Tag value
* `icc` Tag value
* `iia-frv` Tag value
* `import-2026-01-20` Tag value
* `imported` Tag value
* `imports` Tag value
* `indigenous-info` Tag value
* `insert-new-only` Tag value
* `inspection` Tag value
* `jj-resave` Tag value
* `lake` Tag value
* `language_arabic` Tag value
* `language_mandarin` Tag value
* `learning` Tag value
* `log-in` Tag value
* `meeting` Tag value
* `memo` Tag value
* `mempc` Tag value
* `no_damage` Tag value
* `over_floor_fooding` Tag value
* `pets` Tag value
* `plans` Tag value
* `police` Tag value
* `property_affected` Tag value
* `pumps` Tag value
* `recovery` Tag value
* `red-cross` Tag value
* `remove` Tag value
* `reset` Tag value
* `residential_damage_uninhabitable` Tag value
* `road` Tag value
* `road-closure` Tag value
* `road-closures` Tag value
* `roads` Tag value
* `sandbags` Tag value
* `scd` Tag value
* `school` Tag value
* `security` Tag value
* `shopping` Tag value
* `sia` Tag value
* `south-wang-zone-a` Tag value
* `tag` Tag value
* `tagged` Tag value
* `test` Tag value
* `training` Tag value
* `training-spare` Tag value
* `training-user` Tag value
* `training-user-admin-coord` Tag value
* `training-user-beginners` Tag value
* `training-user-communications` Tag value
* `training-user-fpn-coord` Tag value
* `training-user-fpn-officer` Tag value
* `training-user-impact-assessment` Tag value
* `training-user-recovery-manager` Tag value
* `training-user-recovery-officer` Tag value
* `training-user-share` Tag value
* `training-user-shared` Tag value
* `training_notes` Tag value
* `training_numbers` Tag value
* `travel` Tag value
* `tree` Tag value
* `updated-jan21-1250` Tag value
* `vegetarian` Tag value
* `vego` Tag value
* `vehicles` Tag value
* `vicpol` Tag value
* `waste` Tag value
* `water` Tag value
* `weather` Tag value
* `youth_team` Tag value
* `zone-1` Tag value

### tasks: Related to Needs & Tasks (related)

* `tasks:(id:123)` Search the related record by related record ID `123`
* `tasks:(field1:value field2:value2)` Search the related record using a nested set of filters
* `has:tasks` Filter records where `tasks` is set to any value
* `hasnt:tasks` Filter records where `tasks` is not set

### templatename: Search for a template by its name (string)

* `templatename:some templatename:words` These words are in any order within `templatename`
* `templatename:friend*` A wildcard search that matches `friend`, `friendly`, `friendship`, etc in `templatename`
* `templatename:"a phrase"` This phrase is in `templatename`

### userid: The userId of the user that initially created the record (user)

* `userid:value` Filter on a specific value of `userid`
* `has:userid` Filter records where `userid` is set to any value
* `hasnt:userid` Filter records where `userid` is not set

### uuid: The UUID of the record (string)

* `uuid:123` Returns just record by its UUID `123`

### within: Filter records within a search area (geo)

* `within:my-search-area` Filter records fully within the defined `my-search-area` geometry
* `within:"WKT"` Filter records within a geometry specified by Well Known Text (WKT)
* `not within:my-search-area` Filter records fully outside of the nominated search area
* `intersects:my-search-area` Filter records that are fully or partly within the defined `my-search-area` geometry
* `has:within` Filter records where `within` is set to any value
* `hasnt:within` Filter records where `within` is not set


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cw.crisisworks.com/security-and-support/technical-reference/cql-reference/cql-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
