# Filter

Filter reads a list and returns only the items that match your rules. Non-matching items are discarded.

## When to use it

Use Filter when later steps only need part of a list, such as unpaid registrations or orders above a minimum. Use [Split](/documentation/flowcrafter/nodes/flow/split/) when both matching and non-matching items need their own paths.

## Settings

![Filter settings keeping entries whose Email matches jordan@example.org](/documentation/flowcrafter/screenshots/node-filter-settings.png)

| Setting | What it does |
|---|---|
| **List to filter** | Chooses a list from any earlier step. Test the source step first if no list appears. |
| **all / any** | Requires every rule to match, or at least one rule to match. |
| **Rules** | Conditions applied to each item. Compare a current-item value such as `{{ item.payment_status }}` with text, a number, or another flow tag. No rules means every item is kept. |

## Output and branches

Filter has one output path. It runs even when no items match.

| Flow tag | Value |
|---|---|
| `{{ "Filter".items }}` | The matching items, in their original order. |
| `{{ "Filter".count }}` | The number of matching items. |

## Good-to-knows

- Non-matching items cannot be recovered downstream.
- An empty result does not stop the workflow. Add a [Condition](/documentation/flowcrafter/nodes/logic/condition-data/) on `count` if needed.
- Use **Insert flow tag** and choose from **Current item** for item fields. Plain `payment_status` is literal text, not a field reference.
- Numeric comparisons need unformatted numbers; values such as `$1,250.00` may compare as text.
- With [Get Entries](/documentation/flowcrafter/nodes/actions/get-entries/), set **Return** to **Full entries**.

## Example

Choose a registrations list and add the rule `{{ item.payment_status }}` **is** `Unpaid`. If 30 of 200 items match, Filter outputs those 30 items and a count of `30`.

Here, Get Entries returns three entries with **Return** set to **Full entries**. Payment status is field `5`, so the rule uses `{{ item.5 }}` **is** `Unpaid`. The quick test keeps the two unpaid entries and returns a count of `2`.

![Filter quick-test settings matching Unpaid in field 5, with two matching items and a count of 2](/documentation/flowcrafter/screenshots/example-filter-settings.png)
