# Data Read Previous

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

Available in: Page Flow and Cloud Flow

Toolbox Category: Data - Read

Block Type: [Regular](/app-editor/page-flow/block-anatomy.md#regular-block)
{% endhint %}

**`Data Read Previous`** is a [regular block](/app-editor/page-flow/block-anatomy.md#regular-block) that initiates reading of the previous page of [records](/app-editor/data/database-tables.md#table-records) from a [database table](/app-editor/data/database-tables.md).

<div align="left"><figure><img src="/files/4KsUWFFHbKWLyMwgo4cP" alt="" width="254"><figcaption><p>Data Read Previous block</p></figcaption></figure></div>

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

* *Table:* [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that accepts a [*text*](/app-editor/page-flow/references/value-types.md) value representing the name of the [Database Table](/app-editor/data/database-tables.md) .
* *Dataset Name:* [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that accepts a [*text*](/app-editor/page-flow/references/value-types.md) 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](/app-editor/page-flow/toolbox-blocks/data-read.md) or a [Data Read Next](/app-editor/page-flow/toolbox-blocks/data-read-next.md) 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](/app-editor/page-flow/toolbox-blocks/data-read.md) 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](/app-editor/page-flow/toolbox-blocks/data-status.md) block.&#x20;
* To access the records after a successful read, see [Data Record Count](/app-editor/page-flow/toolbox-blocks/data-record-count.md), [Data Record Loop](/app-editor/page-flow/toolbox-blocks/data-record-loop.md), [Data Record at Index](/app-editor/page-flow/toolbox-blocks/data-record-at-index.md) blocks.
  {% endhint %}

***

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

<div align="left"><figure><img src="/files/iOKUN62iMRmUlMoLO95O" alt="" width="519"><figcaption><p>Data Read Previous example</p></figcaption></figure></div>

Here is a summary of the above example:

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


---

# 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-read-previous.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.
