# How to Use the "Is In" Operator

This operator works best on pick-list and text type fields.

### Basic Usage

To get started, create a list of values you want to check for in your desired field. For example, if you want to see if the Accounts's Billing Country is in North America for an account distribution, you could set up criteria using the "Is In" operator as below:

1. Select `BillingCountry` as the Account Field
2. Select the `Is In` operator
3. Enter each country name separated by a comma

<figure><img src="/files/YnQ6hnNTNwKQ5eTDG11R" alt=""><figcaption><p>Using the "Is In" operator to match a list of country names</p></figcaption></figure>

### **Is Not In**

This operator can also be used to be sure that a field on the account does **not** equal a set of values by adding custom logic.

For example, you might want to go a step further from the example above and make sure that accounts are in North America and the account source is **not** "Partner" or "Event."

The steps to accomplish this are as follows:

1. Select `AccountSource` in the Account Field
2. Select the `Is In` operator
3. Enter "Partner" and "Event" separated by a comma (e.g. `Partner, Event`)

<figure><img src="/files/DvTgETOayyjuI03zhlHC" alt=""><figcaption></figcaption></figure>

4. Add custom Logic by clicking the dropdown under "Distribution Criteria" and select "Custom Condition Logic Is Met".

<figure><img src="/files/mIG4Ea2Aj0Iu9EUWeBtT" alt=""><figcaption></figcaption></figure>

5. Enter logic so that Condition 1 is met and Condition 2 is not met: `1 AND NOT(2)`

<figure><img src="/files/ZGYGOyLfr1CBqbFu1Ek7" alt=""><figcaption></figcaption></figure>

Now you have 2 Conditions:

* **Condition 1** looks to see if the `Billing Country` is `United States, Canada, or Mexico`
* **Condition 2** looks to see if the `Account Source` is `Partner` or `Event`.

By adding custom logic, you have created criteria where `Billing Country` must be `United States, Canada, or Mexico` **AND** `Account Source` must **NOT** be either `Partner` or `Event`*.*


---

# Agent Instructions: 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:

```
GET https://docs.gradient.works/kb/bookbuilder/how-to-guides/use-the-is-in-operator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
