# Data Read Next

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

Available in: Page Flow and Cloud Flow

Toolbox Category: Data - Read

Block Type: [Regular](https://docs.zingy.ai/app-editor/block-anatomy#regular-block)
{% endhint %}

**`Data Read Next`** is a [regular block](https://docs.zingy.ai/app-editor/block-anatomy#regular-block) that initiates reading of the next page of [records](https://docs.zingy.ai/data/database-tables#table-records) from a [database table](https://docs.zingy.ai/app-editor/data/database-tables).&#x20;

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FFmbLC1ynFQAk62kQxwOf%2Fimage.png?alt=media&#x26;token=610586d2-4aa9-4a27-a5ee-346e630dae02" alt="" width="226"><figcaption><p>Data Read Next block</p></figcaption></figure></div>

The block consists of the following (from top to bottom):

* *Table:* [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the name of the [Database Table](https://docs.zingy.ai/app-editor/data/database-tables) .
* *Dataset Name:* [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the name of the dataset.

{% hint style="success" %}
**NOTE**:&#x20;

* This block only functions if a previous database read, using a [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read) block, for the same table and dataset, was initiated and completed.
* The same database *Query* with input parameters and *Per Page* values that were provided with the [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read) block will be used here.
* This block initiates the database read, which will occur in the background. To track the status and to take an action upon completion of the read, use the [Data Status](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-status) block.&#x20;
* To access the records after a successful read, see [Data Record Count](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-count), [Data Record Loop](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-loop), [Data Record at Index](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-at-index) blocks.
  {% endhint %}

***

## 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 Read Next`** block.

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FGUipvNIMt7zOpA8JTiS8%2Fimage.png?alt=media&#x26;token=ae692f0a-2f71-482c-b80f-ada8482e354c" alt="" width="507"><figcaption><p>Data Read Next example</p></figcaption></figure></div>

Here is a summary of the above example:

* The [Mouse/Keyboard Action](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/mouse-keyboard-action) block is used to handle a button click.
* When the button is clicked, the **`Data Read Next`** block is used to initiate a read for the next page.
* The [Data Status](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-status) block is used to track the status of the read and upon success,  the *do something* function is invoked.
