# Assign a Value from a Data View

The API call remains the same.  The body varies only in the ‘entity’ section.  In the straight text assignment above, the ‘value’ section contains only the string to be assigned.  Here, in the ‘value’ section, we include three additional items from the data view to be used as the data source:  the data view name, it’s version, and the name of the attribute from the data view to be used.

&#x20;

```
{
    "context": {
        "user": "usef_id",
        "password": "xxxx",
        "project": {
            "name": "imp_payments_demo",
            "version": "1.0"
        },
        "workSet": {
            "name": "api_2_workset",
            "version": "1.1"
        }
    },
    "entity": {
        "step": {
            "name": "imp_validate_outcomes",
            "version": "1.0"
        },
        "attribute": "test_string",
        "operands": [
            {
                "operator": "ASSIGN",
                "value": {
                    "name": "cust_data_view",
                    "version": "1.0",
                    "attribute": "customer_type"
                }
            }
        ]
    }
}
```

&#x20;

In Postman, the call looks like this:

<figure><img src="/files/8lD40dqWfjTvurZHhLgE" alt=""><figcaption><p>Rule in Postman</p></figcaption></figure>

The return message (for a successful call) is the same as for the prior call, showing all of the details for the rule created:

<figure><img src="/files/c0cnQcNQmPFHOisUvZIp" alt=""><figcaption><p>Return message in Postman</p></figcaption></figure>

In TDO, you can see the new rule.

<figure><img src="/files/XgpqlBkiNNiTEmc5OmPC" alt=""><figcaption><p>New Rule in TDO</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/api-guide/assignment-rule-apis/create-assignment-rule/assign-a-value-from-a-data-view.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
