Skip to content

Commit 6a4d622

Browse files
authored
Merge pull request #157704 from lauradolan/table-data-format
Logic Apps: table format for data operations
2 parents aa6051c + 7b35e65 commit 6a4d622

File tree

1 file changed

+69
-16
lines changed

1 file changed

+69
-16
lines changed

articles/logic-apps/logic-apps-perform-data-operations.md

Lines changed: 69 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Perform operations on data
33
description: Convert, manage, and manipulate data outputs and formats in Azure Logic Apps
44
services: logic-apps
55
ms.suite: integration
6-
ms.reviewer: klam, logicappspm
6+
ms.reviewer: logicappspm
77
ms.topic: article
8-
ms.date: 09/20/2019
8+
ms.date: 05/11/2021
99
---
1010

1111
# Perform data operations in Azure Logic Apps
@@ -18,9 +18,23 @@ This article shows how you can work with data in your logic apps by adding actio
1818

1919
If you don't find the action you want here, try browsing the many various [data manipulation functions](../logic-apps/workflow-definition-language-functions-reference.md) that Azure Logic Apps provides.
2020

21+
## Prerequisites
22+
23+
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
24+
25+
* The logic app where you need the operation for working with data
26+
27+
If you're new to logic apps, review [What is Azure Logic Apps?](../logic-apps/logic-apps-overview.md) and [Quickstart: Create your first logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
28+
29+
* A [trigger](../logic-apps/logic-apps-overview.md#logic-app-concepts) as the first step in your logic app
30+
31+
Data operations are available only as actions, so before you can use these actions, start your logic app with a trigger and include any other actions required for creating the outputs you want.
32+
33+
## Data operation actions
34+
2135
These tables summarize the data operations you can use and are organized based on the source data types that the operations work on, but each description appears alphabetically.
2236

23-
**Array actions**
37+
### Array actions
2438

2539
These actions help you work with data in arrays.
2640

@@ -33,7 +47,7 @@ These actions help you work with data in arrays.
3347
| [**Select**](#select-action) | Create an array from the specified properties for all the items in a different array. |
3448
|||
3549

36-
**JSON actions**
50+
### JSON actions
3751

3852
These actions help you work with data in JavaScript Object Notation (JSON) format.
3953

@@ -45,18 +59,6 @@ These actions help you work with data in JavaScript Object Notation (JSON) forma
4559

4660
To create more complex JSON transformations, see [Perform advanced JSON transformations with Liquid templates](../logic-apps/logic-apps-enterprise-integration-liquid-transform.md).
4761

48-
## Prerequisites
49-
50-
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
51-
52-
* The logic app where you need the operation for working with data
53-
54-
If you're new to logic apps, review [What is Azure Logic Apps?](../logic-apps/logic-apps-overview.md) and [Quickstart: Create your first logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
55-
56-
* A [trigger](../logic-apps/logic-apps-overview.md#logic-app-concepts) as the first step in your logic app
57-
58-
Data operations are available only as actions, so before you can use these actions, start your logic app with a trigger and include any other actions required for creating the outputs you want.
59-
6062
<a name="compose-action"></a>
6163

6264
## Compose action
@@ -270,6 +272,9 @@ To confirm whether the **Create CSV table** action creates the expected results,
270272

271273
!["Output" fields for the "Create CSV table" action](./media/logic-apps-perform-data-operations/send-email-create-csv-table-action.png)
272274

275+
> [!NOTE]
276+
> If your table is returned with incorrect formatting, see [how to check your table data formatting](#format-table-data).
277+
273278
1. Now, manually run your logic app. On the designer toolbar, select **Run**.
274279

275280
Based on the email connector you used, here are the results you get:
@@ -427,6 +432,9 @@ To confirm whether the **Create HTML table** action creates the expected results
427432
> When including the HTML table output in an email action, make sure that you set the **Is HTML** property to **Yes**
428433
> in the email action's advanced options. That way, the email action correctly formats the HTML table.
429434
435+
> [!NOTE]
436+
> If your table is returned with incorrect formatting, see [how to check your table data formatting](#format-table-data).
437+
430438
1. Now, manually run your logic app. On the designer toolbar, select **Run**.
431439

432440
Based on the email connector you used, here are the results you get:
@@ -710,6 +718,51 @@ To confirm whether the **Select** action creates the expected results, send your
710718

711719
![Email with "Select" action results](./media/logic-apps-perform-data-operations/select-email-results.png)
712720

721+
## Troubleshooting
722+
723+
### Format table data
724+
725+
If your [CSV table](#create-csv-table-action) or [HTML table](#create-html-table-action) is returned with incorrect formatting, make sure your input data has line breaks between rows.
726+
727+
Incorrect formatting:
728+
729+
```text
730+
Fruit,Number Apples,1 Oranges,2
731+
```
732+
733+
Correct formatting:
734+
735+
```text
736+
Fruit,Number
737+
Apples,1
738+
Oranges,2
739+
```
740+
741+
To add line breaks between rows, add one of the following expressions to your table:
742+
743+
```text
744+
replace(body('Create_CSV_table'),'','<br/>')
745+
```
746+
747+
```text
748+
replace(body('Create_HTML_table'),'','<br/>')
749+
```
750+
751+
For example:
752+
753+
```json
754+
{
755+
"Send_an_email_": {
756+
"inputs": {
757+
"body": {
758+
"Body": "<p>Results from Create CSV table action:<br/>\n<br/>\n<br/>\n@{replace(body('Create_CSV_table'),'\r\n','<br/>')}</p>",
759+
"Subject": "Create CSV table results",
760+
761+
}
762+
}
763+
}
764+
}
765+
```
713766
## Next steps
714767

715768
* Learn about [Logic Apps connectors](../connectors/apis-list.md)

0 commit comments

Comments
 (0)