UI queries

Describe the queries that can be done at the UI level.

Overview

UI Queries, or simplified queries for the UI, can be written in various parts of the UI generated by the app runtime. For instance, filters that you create in a grid view utilize these types of queries.

The primary objective is to enable app users to compose slightly more complex queries using plain text. For instance, you can create the following queries for an integer field:

  • Value is 10: 10
  • Value is 5 or 9: 5,9
  • Value ranges from 0 to 10 (inclusive): 0..10
  • Value is greater than 10: >10
  • Value is less than or equal to 20 or greater than or equal to 50: <=20,>=50

Not all types support all features, so it’s important to check which features are supported by each type in its respective documentation.

These queries do not have a public REST API and can only be utilized through the UI.

Matching of values

Most text types default to using the “like” operator for matching values. For example, relationship, text, users, groups, etc., will use the “like” operator when matching values.

On the other hand, types like integer, time, date, etc., default to using the “equals” operator to match values.

If you want to force an “equals” match when the default is “like,” you can use =. For instance, if you want to match the word TEST exactly in a text field, you should use =TEST instead of just TEST.

Some types allow the use of special values for matching. For example, date fields support expressions like tomorrow or next 3 days. Make sure to consult the type’s documentation to determine the default matching operator for values and if any special values are available for use.

Finally, you can match empty values by using a dash: -. This will match all records where the value of the field is empty.

Operators

These are the operators you can use for each field. Please refer to each type’s documentation to determine which features are supported.

Multiple values

You can specify multiple values by separating them with commas. For example:

  • Value is like one, two, or three: one,two,three
  • You can use " when dealing with commas in the text. For example, the value should be like one,two or three: "one,two",three
  • You can use it with various different types. For example, for integers: 3,5,7
  • You can also combine them with other operators. For example, values ranging from 0 to 10 or from 20 to 30: 0..10,20..30

Between

This operator allows you to specify a range of values, which is useful for numeric types or date types. In this case, you should use the format from..to. Here are some examples:

  • Filter by integer field with values between 0 and 10 (inclusive): 0..10
  • Filter by decimal field with values between 2.5 and 4.5 (inclusive): 2.5..4.5
  • Filter by date field with values between 2016-07-01 and 2016-07-15: 2016-07-01..2016-07-15
  • Filter by time field with values between 09:00 and 12:00: 09:00..12:00

Less than

This operator allows you to specify the maximum value (exclusive) of a field, which is useful for numeric types or date types. In this case, you should use the format <maxValue. Here are some examples:

  • Filter by integer field with values less than 10: <10
  • Filter by decimal field with values less than 2.75: <2.75
  • Filter by date field with values less than 2016-07-01: <2016-07-01
  • Filter by time field with values less than 12:00: <12:00

Less than or equal to

This operator allows you to specify the maximum value (inclusive) of a field, which is useful for numeric types or date types. In this case, you should use the format <=maxValue. Here are some examples:

  • Filter by integer field with values less than or equal to 10: <=10
  • Filter by decimal field with values less than or equal to 2.75: <=2.75
  • Filter by date field with values less than or equal to 2016-07-01: <=2016-07-01
  • Filter by time field with values less than or equal to 12:00: <=12:00

Greater than

This operator allows you to specify the minimum value (exclusive) of a field, which is useful for numeric types or date types. In this case, you should use the format >minValue. Here are some examples:

  • Filter by integer field with values greater than 10: >10
  • Filter by decimal field with values greater than 2.75: >2.75
  • Filter by date field with values greater than 2016-07-01: >2016-07-01
  • Filter by time field with values greater than 12:00: >12:00

Greater than or equal to

This operator allows you to specify the minimum value (inclusive) of a field, which is useful for numeric types or date types. In this case, you should use the format >=minValue. Here are some examples:

  • Filter by integer field with values greater than or equal to 10: >=10
  • Filter by decimal field with values greater than or equal to 2.75: >=2.75
  • Filter by date field with values greater than or equal to 2016-07-01: >=2016-07-01
  • Filter by time field with values greater than or equal to 12:00: >=12:00

Starts with

This operator allows you to find strings that begin with the specified characters of a field, which is useful for text types. In this case, you should use the format /charToStartWith. Here are some examples:

  • Filter by text field with values that start with ’s’: /s
  • Filter by text field with values that start with ‘Will’: /Will

Ends with

This operator allows you to find strings that end with the specified characters of a field, which is useful for text types. In this case, you should use the format charToEndWith/. Here are some examples:

  • Filter by text field with values that end with ’n’: n/
  • Filter by text field with values that end with ‘own’: own/

Regular expressions

This operator allows you to find strings that match a specific regular expression in a field, which is useful for text types. In this case, you should use the format /regExp/. Here are some examples:

  • Filter by text field with values that start with an ‘S’ or end with ’n’: /^S.*|.*n$/
  • Filter by text field with values that end with ‘own’: /own$/