# Data Record Info

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

Available in: Page Flow and Cloud Flow

Toolbox Category: Data

Block Type: [Output](https://docs.zingy.ai/app-editor/block-anatomy#output-block)

Output Type: [*object*](https://docs.zingy.ai/app-editor/page-flow/references/value-types)
{% endhint %}

**`Data Record Info`** is an [output block](https://docs.zingy.ai/app-editor/block-anatomy#output-block) that provides the object representing a [database record](https://docs.zingy.ai/data/database-tables#table-records) when used inside specific contexts that are discussed [below](#valid-usage-contexts).

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2F82JfzJG1lxOzbKzkde7e%2Fimage.png?alt=media&#x26;token=95813a2f-ffc9-453c-bccf-c2b8bba0d7a5" alt="" width="172"><figcaption><p>Data Record Info block</p></figcaption></figure></div>

The output is of type [*object*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) and is compatible with [Value Parameters](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) of type [*object*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) or of type [*any*](https://docs.zingy.ai/app-editor/page-flow/references/value-types).

***

## Valid Usage Contexts

{% hint style="warning" %}
NOTE: This block will provide valid values only when used in the contexts discussed below:
{% endhint %}

* [Data Record Loop](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-loop) block (inside *Tasks* [Flow Parameter](https://docs.zingy.ai/app-editor/block-anatomy#flow-parameters)) : In this case the **`Data Record Info`** block provides the [record](https://docs.zingy.ai/data/database-tables#table-records) for the current loop iteration.
* [Data Status](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-status) block (inside Success *Tasks* [Flow Parameter](https://docs.zingy.ai/app-editor/block-anatomy#flow-parameters)) : Here the **`Data Record Info`** block provides the first [record](https://docs.zingy.ai/data/database-tables#table-records) read from successful execution of the [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read), [Data Read Next Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-next) , [Data Read Previous Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-previous) and [Data Lookup](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-lookup) blocks.
* [Data Lookup with ID](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-lookup-with-id) block (inside Success *Tasks* [Flow Parameter](https://docs.zingy.ai/app-editor/block-anatomy#flow-parameters)) : Here the **`Data Record Info`** block provides the [record](https://docs.zingy.ai/data/database-tables#table-records) that matched the provided [record ID](https://docs.zingy.ai/data/database-tables#id-field).

***

## Usage Example

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

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

<figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FhbVk7uKgAPsdfStkgcjo%2Fimage.png?alt=media&#x26;token=47ccd404-e3cc-463e-bd59-17213fefbcc7" alt=""><figcaption><p>Example  for Data Record Info block</p></figcaption></figure>

Here is a summary of the above example:

* The [Data Record Loop](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-loop) block is used with the *Customers* [Database Table](https://docs.zingy.ai/app-editor/data/database-tables) and the dataset name of *ds1* are as [Value Parameters](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) .
* For each iteration inside the *Tasks* [Flow Parameter](https://docs.zingy.ai/app-editor/block-anatomy#flow-parameters), we use the [Write Log Message](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/write-log-message) block to log the customer's email address by accessing the *EmailAddress* field of each record.
* To access information about the record, we use our **`Data Record Info`** 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/29/2023 14:27:15.025] john.smith@example.com
[LOG(info) 08/29/2023 14:27:15.026] jane.smith@example.com
[LOG(info) 08/29/2023 14:27:15.026] max.mustermann@example.com
[LOG(info) 08/29/2023 14:27:15.027] joe.bloggs@example.com
```
