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

# Logic: And

> Filters items where all filters match.

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>;
};

Combines several conditions into one and keeps an item only when every single condition matches. Use this when an item has to pass more than one test at the same time, for example "the order is paid **and** the total is above 100". If even one of the conditions fails, the item is filtered out. You usually combine this with the Or and Not logic options to build up the exact rule you need.

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

## Fields

<FormField property="filters" label="Conditions" required diType="filter">
  The conditions that all have to match. Add one row per condition you want to check; an item is kept only when it passes every condition in the list. You need at least one condition, but you will usually add two or more, since a single condition does not need this wrapper.
</FormField>

## Sample data

This filter answers yes or no for each item, so there is no before and after. The example keeps only items where the status equals `paid` **and** the total is at least 100.

| Field       | Value                                     |
| ----------- | ----------------------------------------- |
| Condition 1 | `status` equals `paid`                    |
| Condition 2 | `total` is greater than or equal to `100` |

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

```json Configuration theme={null}
{
  "prototype": "and-condition",
  "parameters": {
    "filters": [
      {
        "prototype": "value-condition-v2",
        "parameters": {
          "accessor": { "prototype": "key", "parameters": { "keys": ["status"] } },
          "conditions": [ { "prototype": "equals", "parameters": { "value": "paid" } } ]
        }
      },
      {
        "prototype": "value-condition-v2",
        "parameters": {
          "accessor": { "prototype": "key", "parameters": { "keys": ["total"] } },
          "conditions": [ { "prototype": "number-greater-than-or-equals", "parameters": { "value": 100 } } ]
        }
      }
    ]
  }
}
```
