> ## Documentation Index
> Fetch the complete documentation index at: https://filla.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Building filter rules

> How to use the filter builder to create conditions for display logic, validation, and automations.

## Where filter rules are used

The same visual filter builder appears across many features in Filla:

* Field show/hide rules (display conditions)
* Page visibility conditions
* Conditional read-only rules
* Custom validation rules
* Linked record filters
* Automation action conditions

Understanding how to build filter rules once gives you the skills to use all of these features.

In field settings, the filter builder opens in a popover when you click the condition trigger, giving you a focused workspace to build your rules.

## Anatomy of a filter rule

A filter rule is made up of **conditions** organized into **groups**.

Each condition has three parts:

| Part         | What it is                            | Example         |
| ------------ | ------------------------------------- | --------------- |
| **Field**    | The field whose value you're checking | `Country`       |
| **Operator** | How to compare the value              | `is`            |
| **Value**    | What to compare against               | `United States` |

Combined: show this element when `Country` `is` `United States`.

## Building a condition

<Steps>
  <Step title="Click 'Add condition'">
    Click the **+ Add condition** button in the filter builder.
  </Step>

  <Step title="Select the target field">
    Choose the field whose value you want to check from the field picker dropdown.
  </Step>

  <Step title="Choose an operator">
    The available operators depend on the field type. Select the comparison you need.
  </Step>

  <Step title="Enter a value">
    For most field types, enter or select the value to compare against. For operators like "is empty" or "is checked", no value is needed.
  </Step>
</Steps>

## Combining conditions with AND / OR

When you add multiple conditions, you must choose how they combine:

* **AND**: all conditions must be true
* **OR**: at least one condition must be true

The AND/OR selector appears between your conditions.

## Condition groups

You can group conditions together and then combine groups. This lets you express logic like:

`(Country is United States AND Plan is Enterprise) OR (Country is Canada AND Plan is Enterprise)`

Click **Add group** to add a new group. Set each group's AND/OR logic independently, then choose how the groups combine with each other.

## Negating a group

Each group can be negated by toggling **None of** (instead of **All of** or **Any of**). This flips the logic: the group evaluates to true only when none of its conditions match.

## Operators reference

### Text operators

| Operator         | True when                                       |
| ---------------- | ----------------------------------------------- |
| contains         | Field value includes the specified text         |
| does not contain | Field value does not include the specified text |
| is               | Field value exactly matches                     |
| is not           | Field value does not exactly match              |
| starts with      | Field value begins with the specified text      |
| ends with        | Field value ends with the specified text        |
| is empty         | Field has no value                              |
| is not empty     | Field has any value                             |

### Number operators

| Operator                 | True when                          |
| ------------------------ | ---------------------------------- |
| greater than             | Value is above the threshold       |
| greater than or equal to | Value is at or above the threshold |
| less than                | Value is below the threshold       |
| less than or equal to    | Value is at or below the threshold |
| between                  | Value is within a min-max range    |
| not between              | Value is outside a min-max range   |

### Date operators

| Operator        | True when                                                         |
| --------------- | ----------------------------------------------------------------- |
| is on           | Date matches exactly                                              |
| is not on       | Date does not match                                               |
| is before       | Date is earlier                                                   |
| is after        | Date is later                                                     |
| is on or before | Date is on or earlier                                             |
| is on or after  | Date is on or later                                               |
| is within       | Date falls within a relative period (e.g., this week, last month) |
| is not within   | Date falls outside the relative period                            |

**Relative date options:**

* **Presets:** today, tomorrow, yesterday, this week, last week, next week, this month, last month, next month, this quarter, last quarter, next quarter, this year, last year, next year
* **Rolling:** X days, weeks, months, quarters, or years in the past or future. For example, "in the last 7 days" or "in the next 3 months".
* **Range:** Between two relative offsets. For example, "between 30 days ago and 7 days ago".

### Select operators

| Operator    | True when                                  |
| ----------- | ------------------------------------------ |
| has any of  | At least one selected option matches       |
| has all of  | All specified options are selected         |
| has none of | None of the specified options are selected |

### Checkbox operators

| Operator     | True when                     |
| ------------ | ----------------------------- |
| is checked   | Checkbox is checked (true)    |
| is unchecked | Checkbox is unchecked (false) |

## Common questions

<AccordionGroup>
  <Accordion title="Can I reference one field's value in comparison to another field?">
    Currently, conditions compare a field's value to a static value you enter in the builder. Cross-field comparison (e.g., "Field A is greater than Field B") is not supported.
  </Accordion>

  <Accordion title="How many conditions can I add?">
    There is no enforced limit on the number of conditions or groups.
  </Accordion>

  <Accordion title="Do conditions update in real time?">
    Yes. When used for display conditions or page visibility, conditions re-evaluate as the respondent types and changes fields. The form updates immediately.
  </Accordion>
</AccordionGroup>
