You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Save your logic app. On the designer toolbar, select **Save**.
167
172
168
-
By default, the **Columns** property is set to automatically create the table columns based on the array items. To specify custom column headers and values, follow these steps:
173
+
### Customize table format
174
+
175
+
By default, the **Columns** property is set to automatically create the table columns based on the array items.
176
+
177
+
To specify custom headers and values, follow these steps:
169
178
170
179
1. Open the **Columns** list, and select **Custom**.
171
180
172
-
1.To specify custom headers, in the **Header** property, specify the column name.
181
+
1.In the **Header** property, specify the custom header text to use instead.
173
182
174
-
1.To specify custom values, in the **Key** property, specify the column value.
183
+
1.In the **Key** property, specify the custom value to use instead.
175
184
176
-
> [!TIP]
177
-
> To create user-friendly tokens for the properties in JSON objects so you can select those properties as inputs,
178
-
> use the [Parse JSON](#parse-json-action) before calling the **Create CSV table** action.
185
+
To reference and edit the values from the array, you can use the `@item()` function in the **Create CSV table** action's JSON definition.
186
+
187
+
1. On the designer toolbar, select **Code view**.
188
+
189
+
1. In the code editor, edit action's `inputs` section to customize the table output the way that you want.
179
190
180
-
To reference and edit the values from the array, or to edit or omit the column headers, you can use the `@item()` function. On the designer toolbar, select **Code view**. Edit the action's definition to use only the `value` property in the `columns` array object, and omit the `header` property, for example:
191
+
This example returns only the column values and not the headers by omitting the `header` property and referencing the values in each `value` property that appears in the `columns` array:
181
192
182
193
```json
183
194
"Create_CSV_table": {
184
195
"inputs": {
185
196
"columns": [
186
-
{ "value": "@item()?['Id']" },
187
-
{ "value": "@item()?['Subject']" }
188
-
]
197
+
{
198
+
"header": "",
199
+
"value": "@item()?['Description']"
200
+
},
201
+
{
202
+
"header": "",
203
+
"value": "@item()?['Product_ID']"
204
+
}
205
+
],
206
+
"format": "CSV",
207
+
"from": "@variables('myJSONArray')"
189
208
}
190
209
}
191
210
```
192
211
212
+
Here is the result that this example returns:
213
+
214
+
```text
215
+
Results from Create CSV table action:
216
+
217
+
Apples,1
218
+
Oranges,2
219
+
```
220
+
221
+
In the designer, the **Create CSV table** action now appears this way:
222
+
223
+

224
+
193
225
For more information about this action in your underlying workflow definition, see the [Table action](../logic-apps/logic-apps-workflow-actions-triggers.md#table-action).
194
226
195
227
### Test your logic app
@@ -242,37 +274,69 @@ If you prefer working in the code view editor, you can copy the example **Create
242
274
243
275

244
276
277
+
> [!TIP]
278
+
> To create user-friendly tokens for the properties in JSON objects so you can select
279
+
> those properties as inputs, use the [Parse JSON](#parse-json-action) before calling
280
+
> the **Create HTML table** action.
281
+
245
282
Here is the finished example **Create HTML table** action:
246
283
247
284

248
285
249
286
1. Save your logic app. On the designer toolbar, select **Save**.
250
287
251
-
By default, the **Columns** property is set to automatically create the table columns based on the array items. To specify custom column headers and values, follow these steps:
288
+
### Customize table format
289
+
290
+
By default, the **Columns** property is set to automatically create the table columns based on the array items.
291
+
292
+
To specify custom headers and values, follow these steps:
252
293
253
294
1. Open the **Columns** list, and select **Custom**.
254
295
255
-
1.To specify custom headers, in the **Header** property, specify the column name.
296
+
1.In the **Header** property, specify the custom header text to use instead.
256
297
257
-
1.To specify custom values, in the **Key** property, specify the column value.
298
+
1.In the **Key** property, specify the custom value to use instead.
258
299
259
-
> [!TIP]
260
-
> To create user-friendly tokens for the properties in JSON objects so you can select those properties as inputs,
261
-
> use the [Parse JSON](#parse-json-action) before calling the **Create CSV table** action.
300
+
To reference and edit the values from the array, you can use the `@item()` function in the **Create HTML table** action's JSON definition.
301
+
302
+
1. On the designer toolbar, select **Code view**.
303
+
304
+
1. In the code editor, edit action's `inputs` section to customize the table output the way that you want.
262
305
263
-
To reference and edit the values from the array, or to edit or omit the column headers, you can use the `@item()` function. On the designer toolbar, select **Code view**. Edit the action's definition to use only the `value` property in the `columns` array object, and omit the `header` property, for example:
306
+
This example returns only the column values and not the headers by omitting the `header` property value and referencing each `value` property that appears in the `columns` array:
264
307
265
308
```json
266
309
"Create_HTML_table": {
267
310
"inputs": {
268
311
"columns": [
269
-
{ "value": "@item()?['Id']" },
270
-
{ "value": "@item()?['Subject']" }
271
-
]
312
+
{
313
+
"header": "",
314
+
"value": "@item()?['Description']"
315
+
},
316
+
{
317
+
"header": "",
318
+
"value": "@item()?['Product_ID']"
319
+
}
320
+
],
321
+
"format": "HTML",
322
+
"from": "@variables('myJSONArray')"
272
323
}
273
324
}
274
325
```
275
326
327
+
Here is the result that this example returns:
328
+
329
+
```text
330
+
Results from Create HTML table action:
331
+
332
+
Apples 1
333
+
Oranges 2
334
+
```
335
+
336
+
In the designer, the **Create HTML table** action now appears this way:
337
+
338
+

339
+
276
340
For more information about this action in your underlying workflow definition, see the [Table action](../logic-apps/logic-apps-workflow-actions-triggers.md#table-action).
0 commit comments