# Data Record ID

{% hint style="info" %}
**Block Information**

Available in: Page Flow and Cloud Flow

Toolbox Category: Data

Block Type: [Output](/app-editor/page-flow/block-anatomy.md#output-block)

Output Type: [*text*](/app-editor/page-flow/references/value-types.md)
{% endhint %}

**`Data Record ID`** is an [output block](/app-editor/page-flow/block-anatomy.md#output-block) that provides the unique [record identifier](/app-editor/data/database-tables.md#id-field) for a record. The output is of type [*text*](/app-editor/page-flow/references/value-types.md) and is compatible with [Value Parameters](/app-editor/page-flow/block-anatomy.md#value-parameters) of type [*text*](/app-editor/page-flow/references/value-types.md) or of type [*any*](/app-editor/page-flow/references/value-types.md).

<div align="left"><figure><img src="/files/0RAE7yHETwR8nATDXgSb" alt="" width="330"><figcaption><p>Data Record ID block</p></figcaption></figure></div>

The block consists of a [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that specifies an object representing a [database record](/app-editor/data/database-tables.md#table-records) (for which you want the [record identifier](/app-editor/data/database-tables.md#id-field)). The [Data Record Info](/app-editor/page-flow/toolbox-blocks/data-record-info.md) block is pre-attached by default.

***

## Usage Example

{% hint style="info" %}
**NOTE: Please refer to the prerequisite information shown** [**here**](/app-editor/page-flow/references/prerequisite-for-data-examples.md) **before seeing the example.**&#x20;
{% endhint %}

The image below shows an example of the **`Data Record ID`** block. This example incorporates the *Usage Example* function, as outlined in the [Database Reading Logic for examples section](/app-editor/page-flow/references/prerequisite-for-data-examples.md#database-reading-logic-for-examples) on the prerequisite information page mentioned above.

<figure><img src="/files/LNX1dLeaTjteOrKJ40iu" alt=""><figcaption><p>Example of Data Record ID block</p></figcaption></figure>

Here is a summary of the above example:

* The [Data Record Loop](/app-editor/page-flow/toolbox-blocks/data-record-loop.md) block is used with the *Customers* [Database Table](/app-editor/data/database-tables.md) and the dataset name of *ds1* are as [Value Parameters](/app-editor/page-flow/block-anatomy.md#value-parameters) .
* For each iteration inside the *Tasks* [Flow Parameter](/app-editor/page-flow/block-anatomy.md#flow-parameters), we use the [Write Log Message](/app-editor/page-flow/toolbox-blocks/write-log-message.md) block to log the current iteration index combined with the [record identifier](/app-editor/data/database-tables.md#id-field) of each record.
* The [Data Record Loop Index](/app-editor/page-flow/toolbox-blocks/data-record-loop-index.md) block is used to get the current iteration index.
* To access information about the [record identifier](/app-editor/data/database-tables.md#id-field), we use the **`Data Record ID`** block.

The result for the above example can be seen in the [browser's web console](https://developer.chrome.com/docs/devtools/console/), and a sample is shown below:

```log
[LOG(info) 08/30/2023 08:45:03.513] Index:  0 ID: 64e7833db5ed96040cc512bd
[LOG(info) 08/30/2023 08:45:03.514] Index:  1 ID: 64e78542b5ed96040cc51328
[LOG(info) 08/30/2023 08:45:03.515] Index:  2 ID: 64e78594b5ed96040cc5133c
[LOG(info) 08/30/2023 08:45:03.515] Index:  3 ID: 64e785c8b5ed96040cc5134b
```


---

# 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.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-id.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.
