---
title: "Return Dynamic Data Rows When Fetching Data From Database"
slug: "return-dynamic-data-rows-fetching-data-database"
updated: 2024-08-21T14:24:03Z
published: 2024-08-21T14:24:03Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Return Dynamic Data Rows When Fetching Data From Database

## Overview

When fetching from a Database through a flow, the data being fetched can be dynamic. This data will be returned as **Dynamic Rows**for use in Decisions. Once the connection is configured, users can manipulate and extract data from the database table from within the Flow Designer.

---

## Example

PrerequisiteThis article requires knowledge on how to setup an external database connection. Please visit [Integrate with Database Table](/v9/docs/insert-update-delete-steps-integration-database) for more information.

This example will fetch data from a database table, establish it is as **Dynamic Rows**, then use an indexing step to display the data dynamically on a Form. Select the .zip file below to download the example for this article. The integration will still need to be completed to the database table and configured through system settings. For more information on importing a project into Decisions, please visit the [Importing and Exporting](/v9/docs/importing-and-exporting-projects) Overview article.

[Return Dynamic Data Rows when Fetching Data From DB-07042020-044636.zip](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/Return%20Dynamic%20Data%20Rows%20when%20Fetching%20Data%20From%20DB-07042020-044636.zip)

---

1. Integrate with the **dbo.entity_account** table from the Decisions database. To do this go to **System > Integrations > Databases > Local Connection > Add Table**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-08-06_10h28_41.png)
2. Select the **Object** to use for the Flow. In this example, **dbo.entity_account** is used.
3. Select or unselect the properties needed.
4. In the Flow Designer, navigate to **Integration > Database > Local Connection > dbo.entity_account (Table)** category. Within the specific database table, select the **Get all from dbo.entity_account** step.
5. Next, configure the settings on the **Get all from dbo_entity_account** step.  In the **Properties** panel on the right under **Output Settings** select the **Data Rows** option from the **Return Data Option** drop-down list.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-08-06_10h33_22.png)
6. Next, locate the **For Each** step in the **Iteration** section of the**Toolbox** and add it to the Flow.
7. In the **Properties** panel on the right under **Data**, the default option is DynamicDataRow as invoked by the Get All step. This uses conversion to a Decisions type in order to output it as dynamically mapped data.Under Outputs on the **For Each**step, a single **item** that is of the type **Dynamic Data Row** and has numerous fields that we can use in the flow to display our data.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-08-06_10h35_12.png)
8. Next, add a **[Pick or Create Form]** step to the Flow. [Create a Form](/v9/docs/create-forms) that will display the **Dynamic Row.**
9. First, locate a **Label** control and drag one onto the form. Set the labels to **D****ynamic** and they will display data from the Flow. To accomplish this, in the **Properties** panel, under **Common Properties** check the box **Text from Data Name** and provide Data Name.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-08-06_10h37_38.png) Save and close to return back to the Flow Designer.
10. Select the Form to edit the **Inputs**, here the label can be specified to the database. Set Item Field 21 (this will be the email address) to mapping type **Select From Flow**. Then, choose the corresponding **Item.Field#.TextValue** to appear on the label.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-08-21_10h23_15.png)
11. Clicking the **Next** button will step through each row in the database table and display the fields that were specified. The example stops at 6 because on the **Get all from dbo_entity_account** step we specified the **Limit Count.**

---

For further information on Integrations, visit the [Decisions Forum](https://community.decisions.com/categories/Integrations).
