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

# Filter by transformer result

> Filters items by applying a transformer and comparing the result.

Decides whether to keep an item by comparing a value from the item against a value produced by a transformer. This is useful when the value you want to compare against is not fixed text but something you have to build or look up first, such as the set of allowed codes produced by a transformer. The transformer produces a reference result, then a value from the item is compared against a value from that result, and the item is kept only when the comparison succeeds.

This documentation describes: [Schema](/schemas/filter/transformer-filter)

## Fields

**Data transformer**

Required

The transformer that produces the reference data to compare against. By default it runs once with no input, so it suits transformers that build a fixed list or lookup value. Turn on "Use entity data in transformer" below if you instead want it to work on the current item.

See the [transformer](/references/transformer) reference.

**Comparator**

Required

How the two values are compared, for example "equals", "is one of", or "contains". The item is kept when the comparison is true.

See the [comparator](/references/comparator) reference.

**Entity Path**

Required

An expression pointing at the value from the current item to compare, for example `status` or `customer.email`.

**Search Pattern**

Required

An expression pointing at the value to read from the transformer's result, which becomes the other side of the comparison. For example, if the transformer produces `{ "allowed": "paid" }`, use `allowed` to compare against that value.

**Use entity data in transformer.**

Optional

Leave this off (the default) to run the transformer once with no input, which suits transformers that build a fixed reference value. Turn it on to feed the current item into the transformer, so the comparison value is calculated from that item.

## Sample data

This filter answers yes or no for each item, so there is no before and after. The example runs a transformer that produces `{ "allowed": "paid" }`, then compares each item's `status` against that `allowed` value with "equals", so only paid items are kept.

| Field | Value |
| - | - |
| Data transformer | Sets `allowed` to `paid` |
| Comparator | `equals` |
| Entity Path | `status` |
| Search Pattern | `allowed` |
| Use entity data in transformer | off |

| Incoming item | Result |
| - | - |
| `{ "status": "paid" }` | matches |
| `{ "status": "pending" }` | does not match |

```json Configuration theme={null}
{
  "prototype": "transformer-filter",
  "parameters": {
    "transformer": {
      "prototype": "value-setter",
      "parameters": { "configurations": [ { "key": "allowed", "value": "paid" } ] }
    },
    "comparator": "equals",
    "path": "status",
    "search": "allowed",
    "useEntityData": false
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.