> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/docs/develop/guardian/workspace/schemas/schema-fields-reference/array-element-conditions/configure-array-element-conditions.md).

# Configure an Array Element Condition

Set a condition whose IF trigger is a field with **Allow multiple answers** enabled, using **contains** or **= (each)** to match against the field's individual entries instead of the field's value as a whole.

#### Prerequisites

* The schema you are editing has at least one field with **Allow multiple answers** enabled, using a plain value type (Text, Number, or similar — not Sub-Schema).

#### Steps

1. Open the schema editor and scroll down to the **Conditions** section.
2. Click **Add condition**.
3. Open the field picker under **When** (placeholder "Select field…") and select a field that has **Allow multiple answers** enabled.
4. In the comparator dropdown that appears next to the field picker, choose:
   * **contains** — matches if any entry in the field's list equals the value.
   * **= (each)** — matches if every entry in the field's list equals the value.
5. Enter the match value in the field to the right of the comparator.
6. Add **THEN**/**ELSE** fields with **New field** as normal.
7. Save the schema.

{% hint style="info" %}
If the selected field does not have **Allow multiple answers** enabled, the comparator dropdown is replaced with a plain `=`.
{% endhint %}

#### Result

When a user fills in the form:

* **contains**: the THEN/ELSE fields tied to this condition appear as soon as any one entry in the list matches the value.
* **= (each)**: the THEN/ELSE fields appear only once every entry in the list matches the value — an empty list never matches.

The same rule is enforced again when the document is submitted, so a field revealed in the form is never rejected for a different reason on submission.

#### Troubleshooting

**The comparator dropdown only shows `=`, not contains/each.**\
The selected IF field does not have **Allow multiple answers** enabled. Comparator choices only appear for fields that do.

**The condition doesn't match even though the value looks right in the list.**\
Matching is case-sensitive. Check that the entry and the match value match exactly, including capitalization.

**The Excel preview behaves differently for an exported array condition.**\
For array fields, enter **Test Value** entries as comma-separated values without spaces, for example `A,B`. Excel preview compares array fields as the whole cell with `EXACT(...)`, not as "each element equals", so this preview limitation is expected and does not indicate a Guardian runtime error.

#### Related

* Concept: [Array Element Conditions](/docs/develop/guardian/workspace/schemas/schema-fields-reference/array-element-conditions.md)
* Task: [Configure Nested and Cross-Schema Conditions](/docs/develop/guardian/workspace/schemas/schema-fields-reference/cross-schema-conditions/configure-nested-and-cross-schema-conditions.md)
* Task: [Set up Repeatable Field Links](/docs/develop/guardian/workspace/schemas/schema-fields-reference/repeatable-field-links/set-up-repeatable-field-links.md)
* Reference: [Conditional and Visibility Logic](/docs/develop/guardian/workspace/schemas/best-practices-to-implement-schema/conditional-and-visibility-logic.md)


---

# 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://guardian.hedera.com/docs/develop/guardian/workspace/schemas/schema-fields-reference/array-element-conditions/configure-array-element-conditions.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.
