Skip to content

Lookups

Lookups can be used to specify more complex conditions that fields must match when filtering.

Different types have different lookups available to them.

exact

[text] [choice] [integer] [decimal] [date] [datetime] [bool] [array] [structure]

Return values equal to the search value.

ne

[text] [choice] [integer] [decimal] [date] [datetime] [bool]

Return values not equal to the search value.

in

[text] [choice] [integer] [decimal] [date] [datetime] [bool]

Return values that are within the set of search values.

notin

[text] [choice] [integer] [decimal] [date] [datetime] [bool]

Return values that are not within the set of search values.

contains

[text] [array] [structure]

Return values that contain the search value.

startswith

[text]

Return values that start with the search value.

endswith

[text]

Return values that end with the search value.

iexact

[text]

Return values case-insensitively equal to the search value.

icontains

[text]

Return values that case-insensitively contain the search value.

istartswith

[text]

Return values that case-insensitively start with the search value.

iendswith

[text]

Return values that case-insensitively end with the search value.

length

[text] [array]

Return values with a length equal to the search value.

length__in

[text] [array]

Return values with a length that is within the set of search values.

length__range

[text] [array]

Return values with a length that is within an inclusive range of search values.

lt

[integer] [decimal] [date] [datetime]

Return values less than the search value.

lte

[integer] [decimal] [date] [datetime]

Return values less than or equal to the search value.

gt

[integer] [decimal] [date] [datetime]

Return values greater than the search value.

gte

[integer] [decimal] [date] [datetime]

Return values greater than or equal to the search value.

range

[integer] [decimal] [date] [datetime]

Return values within an inclusive range of search values.

iso_year

[date] [datetime]

Return values with an ISO 8601 week-numbering year equal to the search year.

iso_year__in

[date] [datetime]

Return values with an ISO 8601 week-numbering year that is within the set of search years.

iso_year__range

[date] [datetime]

Return values with an ISO 8601 week-numbering year that is within an inclusive range of search years.

week

[date] [datetime]

Return values with an ISO 8601 week number equal to the search number.

week__in

[date] [datetime]

Return values with an ISO 8601 week number that is within the set of search numbers.

week__range

[date] [datetime]

Return values with an ISO 8601 week number that is within an inclusive range of search numbers.

isnull

[text] [choice] [integer] [decimal] [date] [datetime] [bool] [relation] [array] [structure]

Return values that are empty (isnull = True) or non-empty (isnull = False).

  • For text and choice types, 'empty' is defined as the empty string "".
  • For the relation type, 'empty' is defined as there being zero items linked to the record being evaluated.
  • For the array type, 'empty' is defined as the empty array [].
  • For the structure type, 'empty' is defined as the empty structure {}.
  • For all other types, 'empty' is the SQL null value.

contained_by

[array] [structure]

Return values that are equal to, or a subset of, the search value.

overlap

[array]

Return values that overlap with the search value.

has_key

[structure]

Return values that have a top-level key which contains the search value.

has_keys

[structure]

Return values that have top-level keys which contains all of the search values.

has_any_keys

[structure]

Return values that have top-level keys which contains any of the search values.