> For the complete documentation index, see [llms.txt](https://docs.apica.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/api-guide/assignment-rule-apis/create-assignment-rule/using-multiple-operators-in-an-assignment-rule.md).

# Using Multiple Operators in an Assignment Rule

Sometimes you may need to perform operations in assignment rules that use operators such as ‘Add’, ‘Subtract’, etc. (Note that ‘Add’ is both a mathematical operator – add the values of two fields together – and also a text concatenation operator – add one string to the end of another string.)

To perform these operations, you send the multiple operators in a single ‘operands’ array, as shown below where we are assigning the value from the ‘balance’ field in the acts\_view to ‘test\_number’, and then subtracting 525 from that value.

```
{
          "context": {
                    "user": "user_ID",
                    "password": "XXXX",
                    "project": {
                              "name": "imp_payments_demo",
                              "version": "1.0"
                    },
                    "workSet": {
                              "name": "api_2_workset",
                              "version": "1.1"
                    }
          },
          "entity": {
                    "step": {
                              "name": "imp_enter_details",
                              "version": "1.0"
                    },
                    "attribute": "test_number",           
                     "operands": [
                      {
                               "operator": "ASSIGN",
                               "value": {
                                "name": "acts_view",
                                "version": "1.0",
                               "attribute": "balance"
                     }
            },
                      {
                               "operator": "SUBTRACT",
                               "value": "525"
                     }
        ]
          }
}
```

When run in TDO, the response message for a successful call will look very similar to other rules assignment messages. Both of the operators and their values will be reflected in the return message.

<figure><img src="/files/SlV2gPL9HpA0kH2jQ0LJ" alt=""><figcaption><p>Return Message using multiple operators</p></figcaption></figure>

In TDO, after this call runs, you will see the rule assigned to the field.

<figure><img src="/files/NXrAdlNYRjM1x4dvMfC3" alt=""><figcaption><p>Assignment Rule with multiple operators</p></figcaption></figure>
