> ## 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.

# Condition on field value

> Filters items based on the value matching the supplied conditions.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Keeps an item only when the value at a chosen field passes every condition you list. Use this for everyday checks like "keep orders where the total is at least 100" or "keep customers whose email is not empty". You point at a field with an accessor, then list the conditions that value has to meet. If the field holds several values, every one of them has to pass, and an item with no value at that field is never kept.

This documentation describes: [Schema](/schemas/filter/value-condition-v2)

## Fields

<FormField property="accessor" label="Accessor" required diType="accessor">
  The value to look at. You choose a way of reading data from the item, and the conditions below are applied to whatever it returns.
</FormField>

<FormField property="conditions" label="Conditions" diType="condition">
  The checks the value has to pass. Add one row per condition, such as "equals", "is greater than", or "is not empty"; when you add more than one, the value must satisfy all of them. If you leave this empty, the item is kept as long as the accessor finds a value at all.
</FormField>

## Sample data

This filter answers yes or no for each item, so there is no before and after. The example reads the `status` field and keeps only items where it equals `paid`.

| Field      | Value                         |
| ---------- | ----------------------------- |
| Accessor   | Key accessor reading `status` |
| Conditions | Equals `paid`                 |

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

```json Configuration theme={null}
{
  "prototype": "value-condition-v2",
  "parameters": {
    "accessor": { "prototype": "key", "parameters": { "keys": ["status"] } },
    "conditions": [
      { "prototype": "equals", "parameters": { "value": "paid" } }
    ]
  }
}
```
