> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/reference/platform-concepts/operators.md).

# Operators

Both [conditions](https://docs.appfarm.io/reference/platform-concepts/conditions.md) and [filters](https://docs.appfarm.io/reference/platform-concepts/filters.md) use operators to compare data. Appfarm supports many different operators depending on the data type of the values you are comparing.

You can use [comparison operators](#comparison-operators) to check for equality or difference between two values. [Logical operators](#logical-operators) check for the presence or absence of a value. To search for the presence of text in a value, [string operators](#string-operators) are available.

As an example, if you were to filter a data source on all active Projects, you would construct the filter `Projects.Status EQUALS Active`. `EQUALS` is the *operator***,** `Projects.State` is the *left operand* and `Active` is the *right operand*.

## Comparison operators

<table><thead><tr><th width="161">Operator</th><th>Description</th></tr></thead><tbody><tr><td><strong>Equals</strong></td><td>Check if two values match. Both values must be of the same data type.</td></tr><tr><td><strong>Not equals</strong></td><td>Check if two values do not match. Both values must be of the same data type.</td></tr><tr><td><strong>&#x3C;</strong></td><td><em>Available for Integer, Float, Datetime, and Duration data types.</em><br>Check if a value is less than another.</td></tr><tr><td><strong>&#x3C;=</strong></td><td><em>Available for Integer, Float, Datetime, and Duration data types.</em><br>Check if a value is less than or equal to another.</td></tr><tr><td><strong>></strong></td><td><em>Available for Integer, Float, Datetime, and Duration data types.</em><br>Check if a value is greater than another.</td></tr><tr><td><strong>>=</strong></td><td><em>Available for Integer, Float, Datetime, and Duration data types.</em><br>Check if a value is greater than or equal to another.</td></tr></tbody></table>

{% hint style="danger" %}
**Warning**

Properties with a Boolean data type can be *undefined* which is neither true nor false. Typically you should use `Not equals true` when comparing boolean values instead of `Equals false` to ensure you capture these values.
{% endhint %}

## Logical operators

<table><thead><tr><th width="162">Operator</th><th>Description</th></tr></thead><tbody><tr><td><strong>Is any of</strong></td><td><em>Available for String, Integer, Float, Datetime, Duration, and Enum data types.</em><br>Check for the presence of a value in another data source or static value. Both values must be of the same data type. It can also be used to check against <a href="https://docs.appfarm.io/reference/data-model/enumerated-types.md">enum values</a>, for example <code>Project.Status IS ANY OF New, Started</code>. For references, use <strong>Exists in</strong>.</td></tr><tr><td><strong>Is none of</strong></td><td><em>Available for String, Integer, Float, Datetime, Duration, and Enum data types.</em><br>Check for the absence of a value in another data source or static value. Both values must be of the same data type. It can also be used to check against <a href="https://docs.appfarm.io/reference/data-model/enumerated-types.md">enum values</a>, for example <code>Project.Status IS NONE OF Completed, Archived</code>. For references, use <strong>Not exist in</strong>.</td></tr><tr><td><strong>Exists in</strong></td><td><em>Available for Reference data type.</em><br>Check for the presence of an object in another data source. The data source can be restricted to All, Selected, Not Selected, Filtered or Context objects. In data source filters, only All, Selected and Not Selected are offered.</td></tr><tr><td><strong>Not exist in</strong></td><td><em>Available for Reference data type.</em><br>Check for the absence of an object in another data source. The data source can be restricted to All, Selected, Not Selected, Filtered or Context objects. In data source filters, only All, Selected and Not Selected are offered.</td></tr><tr><td><strong>Has all of</strong></td><td><em>Available for Reference data type with</em> <a href="https://docs.appfarm.io/reference/data-model/object-class-properties.md#general-properties"><em>cardinality Many</em></a> <em>and for Multi Enum properties.</em><br>Check if <em>all</em> of the values of the left operand are present in the right operand. For a multi-reference property, the left operand contains a list of IDs (references).</td></tr><tr><td><strong>Has some of</strong></td><td><em>Available for Reference data type with</em> <a href="https://docs.appfarm.io/reference/data-model/object-class-properties.md#general-properties"><em>cardinality Many</em></a> <em>and for Multi Enum properties.</em><br>Check if <em>some</em> of the values of the left operand are present in the right operand. For a multi-reference property, the left operand contains a list of IDs (references).</td></tr><tr><td><strong>Has none of</strong></td><td><em>Available for Reference data type with</em> <a href="https://docs.appfarm.io/reference/data-model/object-class-properties.md#general-properties"><em>cardinality Many</em></a> <em>and for Multi Enum properties.</em><br>Check if <em>none</em> of the values of the left operand are present in the right operand. For a multi-reference property, the left operand contains a list of IDs (references).</td></tr><tr><td><strong>Has value</strong></td><td>Check for the presence of a value, and that the property is not empty or set to <em>null</em>.</td></tr><tr><td><strong>Has no value</strong></td><td>Check for the absence of a value, such as when the property is empty or set to <em>null</em>.</td></tr></tbody></table>

Properties of type Time of Day, Time Zone, Internet URL, Image URL, Rich Text, Secret, Schema, Resource File and Blob support only **Has value** and **Has no value**.

## String operators

When the left operand has a data type of String, the string operators are made available, and you can compare the value against another string. Note that these operators are *not* available when constructing filters in data sources. They are only available when constructing client-side conditions and filters in the [UI](https://docs.appfarm.io/reference/apps/ui.md) or [actions](https://docs.appfarm.io/reference/actions.md).

All string operators are case insensitive.

{% hint style="info" %}
**Example**

To help describe how these operators work, we'll use the example of a data source filter. The data source has a property *name* (left operand), and we want to compare the value of that property with the text *big blue button* (right operand). The Results column in the table below describes what would be returned from the filter when using a given operator.
{% endhint %}

<table><thead><tr><th width="217.33333333333331">Operator</th><th>Results</th></tr></thead><tbody><tr><td><strong>Starts with</strong></td><td>Objects whose name property starts with <em>big blue button</em>.</td></tr><tr><td><strong>Ends with</strong></td><td>Objects whose name property ends with <em>big blue button</em>.</td></tr><tr><td><strong>Contains</strong></td><td>Objects whose name property contains the exact phrase <em>big blue button</em>.</td></tr><tr><td><strong>Contains all</strong></td><td>Objects whose name property contains all three words <em>big</em>, <em>blue</em>, and <em>button</em>, including as part of larger words.</td></tr><tr><td><strong>Contains all words</strong></td><td>Objects whose name property contains all three standalone words <em>big</em>, <em>blue</em>, and <em>button</em>.</td></tr><tr><td><strong>Contains any</strong></td><td>Objects whose name property contains at least one of the three words <em>big</em>, <em>blue</em>, or <em>button</em>, including as part of larger words.</td></tr><tr><td><strong>Not contains</strong></td><td>Objects whose name property does not contain the exact phrase <em>big blue button</em>.</td></tr><tr><td><strong>Not contains all</strong></td><td>Objects whose name property does not contain all three words <em>big</em>, <em>blue</em>, and <em>button</em>, including as part of larger words.</td></tr><tr><td><strong>Not contains all words</strong></td><td>Objects whose name property does not contain all three standalone words <em>big</em>, <em>blue</em>, and <em>button</em>.</td></tr><tr><td><strong>Not contains any</strong></td><td>Objects whose name property does not contain any of the three words <em>big</em>, <em>blue</em>, or <em>button</em>, including as part of larger words.</td></tr></tbody></table>

Words in the right operand are separated by spaces, so punctuation counts as part of a word. For example, with **Contains all words**, `blue,` does not match a name that contains `blue`. If the right operand is empty, **Contains all words** matches no objects.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/reference/platform-concepts/operators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
