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

# Apply operator with prepared values

> Applies the operator on every item of the left and right array values.

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

Applies the operator on the incoming value together with one or more values you set up in advance. You pick an operator, such as add, multiply, or concatenate, then provide fixed values to place before (Left) and after (Right) the incoming value. The operator runs across the whole set in order: the prepared left values, the incoming value, then the prepared right values. This is handy when you always apply the same fixed adjustment to a value, such as multiplying every net price by a VAT factor, or wrapping a code between a fixed prefix and suffix.

This documentation describes: [Schema](/schemas/mapper/prepared-operator)

## Fields

<FormField property="operator" label="Operator" required diType="operator">
  The calculation or combination applied to the values, such as add, multiply, or concatenate.
</FormField>

<FormField property="left" label="Left">
  One or more fixed values placed before the incoming value when the operator runs. Enter a single value or a list of values. Leave it empty to start from the incoming value alone.
</FormField>

<FormField property="right" label="Right">
  A list of fixed values placed after the incoming value when the operator runs. Leave it empty to add nothing after the incoming value.
</FormField>

## Sample data

| Field    | Value          |
| -------- | -------------- |
| Operator | Math: Multiply |
| Left     | (empty)        |
| Right    | `1.21`         |

The net price is multiplied by the fixed VAT factor `1.21` to give the gross price (`100 × 1.21`):

Input:

```json theme={null}
{ "netPrice": 100 }
```

Output:

```json theme={null}
{ "netPrice": 121 }
```

```json Configuration theme={null}
{
  "prototype": "prepared-operator",
  "parameters": {
    "operator": "multiplication",
    "right": [1.21]
  }
}
```
