# Write to Data Table

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to write data back to the data table based on the provided data table path. The execution result is stored in the dynamic variable.

## Syntax

**Input Value**: `<datatable_path>;<row>;<col>;<value>` <br>

{% hint style="info" %}
**Note**:&#x20;

* Create and copy the data table path from the **Test Data management** page. To learn how to create Data Table, [click here](broken://pages/t0NMmOULVS78pJDF2sID).
* When pasting the data table path from the **Test Data Management** page, the path appears in this format: **avoassure/folder name/table name**. You must remove the **avoassure/** prefix from the path before using it.
  {% endhint %}

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>&#x3C;datatable_path><br>(Required)</td><td>Provide the path of the data table where you want to write the data.</td><td></td></tr><tr><td>&#x3C;row><br>(Required)</td><td>Provide the row number where you want to write the value.</td><td></td></tr><tr><td>&#x3C;col><br>(Required)</td><td>Provide the column number where you want to write the value.</td><td></td></tr><tr><td>&#x3C;value><br>(Required)</td><td>Provide the value you want to enter in the specified row and column.</td><td></td></tr></tbody></table>

**Output Value**: `<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)`

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>&#x3C;Dynamic Variable>(Optional);&#x3C;Dynamic Variable>(Optional)</td><td>Both dynamic variables store the status as <strong>True</strong> or <strong>False</strong>.</td><td></td></tr></tbody></table>

## Example: Writing a Value into a Data Table

In this example, we explain how to write a specific value into a selected row and column of a data table.

* **Action**: Write to Data Table
* **Input Value**: Login Details/User Info;1;1;John
  * The first argument (**Login Details/User Info**) specifies the target data table name (User Info).
  * The second argument (**1**) specifies the row number where the value must be written.
  * The third argument (**1**) specifies the column number where the value must be updated.
  * The fourth argument (**John**) specifies the value to be written into the selected row and column.
* **Output Value**: {WriteStatus}
  * The result of the write operation is stored in the **{WriteStatus}** dynamic variable, with the following possible values:
    * **True**: If the value is successfully written to the specified row and column.
    * **False**: If the operation fails due to an invalid table name, incorrect row/column reference, or unreadable data table.
* **Logical Explanation**: The **Write to Data Table** action takes the value from the **Input Value** column (**Login Details/User Info;1;1;John**). It writes the value John into row 1 and column 1 of the User Info data table. After the update, the execution result is stored in the **{WriteStatus}** variable.

<figure><img src="/files/CgG545hLHxdAPyABY93H" alt=""><figcaption></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.avoautomation.com/avo-assure/actions/generic/data-table/write-to-data-table-1.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.
