Skip to main content

INCLUDE_ONLY

Written by Tom Williams

Type: Function

Function: INCLUDE_ONLY

Syntax: INCLUDE_ONLY(list, values)

Description: Returns true if every value of the list is one of the values. Unlike INCLUDE_EXACTLY, the list does not need to contain all of them.

INCLUDE_ONLY is another name for CONTAINS_ONLY: both names can be used.

It is the same condition as the contains only filter of the insight designer (see Using filters). Use it in a custom formula, to count, group or label records on that condition, or as a filter in a query sent through the Keypup API or MCP server.

Sample usage:

  • INCLUDE_ONLY(label_names, ["bug", "urgent"]) returns true for the records labelled "bug", "urgent" or both, and nothing else.

  • INCLUDE_ONLY(label_names, ["bug", "urgent"]) also returns true for a record with no label: an empty list contains no other value.

Did this answer your question?