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
@@ -172,55 +172,93 @@ If you prefer working in the code view editor, you can copy the example **Create
172
172
173
173
### Customize table format
174
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:
175
+
By default, the **Columns** property is set to automatically create the table columns based on the array items. To specify custom headers and values, follow these steps:
178
176
179
177
1. Open the **Columns** list, and select **Custom**.
180
178
181
179
1. In the **Header** property, specify the custom header text to use instead.
182
180
183
-
1. In the **Key** property, specify the custom value to use instead.
181
+
1. In the **Value** property, specify the custom value to use instead.
184
182
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.
183
+
To return values from the array, you can use the [`item()` function](../logic-apps/workflow-definition-language-functions-reference.md#item) with the **Create CSV table** action. In a `For_each` loop, you can use the [`items()` function](../logic-apps/workflow-definition-language-functions-reference.md#items).
186
184
187
-
1. On the designer toolbar, select **Code view**.
185
+
For example, suppose you want table columns that have only the property values and not the property names from an array. To return only these values, follow these steps for working in designer view or in code view. Here is the result that this example returns:
188
186
189
-
1. In the code editor, edit action's `inputs` section to customize the table output the way that you want.
187
+
```text
188
+
Apples,1
189
+
Oranges,2
190
+
```
190
191
191
-
This example returns only the column values and not the headers from the `columns` array by setting the `header` property to an empty value and dereferencing each `value` property:
192
+
#### Work in designer view
192
193
193
-
```json
194
-
"Create_CSV_table": {
195
-
"inputs": {
196
-
"columns": [
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')"
208
-
}
209
-
}
210
-
```
194
+
In the action, keep the **Header** column empty. On each row in the **Value** column, dereference each array property that you want. Each row under **Value** returns all the values for the specified array property and becomes a column in your table.
211
195
212
-
Here is the result that this example returns:
196
+
1. Under **Value**, on each row that you want, click inside the edit box so that the dynamic content list appears.
213
197
214
-
```text
215
-
Results from Create CSV table action:
198
+
1. In the dynamic content list, select **Expression**.
216
199
217
-
Apples,1
218
-
Oranges,2
219
-
```
200
+
1. In the expression editor, enter this expression that specifies the array property value that you want, and select **OK**.
201
+
202
+
`item()?['<array-property-name>']`
203
+
204
+
For example:
205
+
206
+
*`item()?['Description']`
207
+
*`item()?['Product_ID']`
208
+
209
+

210
+
211
+
1. Repeat the previous steps for each array property that you want. When you're done, your action looks like this example:
1. To resolve expressions into more descriptive versions, switch to code view and back to designer view, and then reopen the collapsed action:
216
+
217
+
The **Create CSV table** action now appears like this example:
218
+
219
+

220
+
221
+
#### Work in code view
222
+
223
+
In the action's JSON definition, within the `columns` array, set the `header` property to an empty string. For each `value` property, dereference each array property that you want.
224
+
225
+
1. On the designer toolbar, select **Code view**.
226
+
227
+
1. In the code editor, in the action's `columns` array, add the empty `header` property and this `value` expression for each column of array values that you want:
228
+
229
+
```json
230
+
{
231
+
"header": "",
232
+
"value": "@item()?['<array-property-name>']"
233
+
}
234
+
```
235
+
236
+
For example:
237
+
238
+
```json
239
+
"Create_CSV_table": {
240
+
"inputs": {
241
+
"columns": [
242
+
{
243
+
"header": "",
244
+
"value": "@item()?['Description']"
245
+
},
246
+
{
247
+
"header": "",
248
+
"value": "@item()?['Product_ID']"
249
+
}
250
+
],
251
+
"format": "CSV",
252
+
"from": "@variables('myJSONArray')"
253
+
}
254
+
}
255
+
```
220
256
221
-
In the designer, the **Create CSV table** action now appears this way:
257
+
1. Switch back to designer view, and reopen the collapsed action.
222
258
223
-

259
+
The **Create CSV table** action now appears like this example, and the expressions have resolved to more descriptive versions:
260
+
261
+

224
262
225
263
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).
226
264
@@ -287,55 +325,93 @@ If you prefer working in the code view editor, you can copy the example **Create
287
325
288
326
### Customize table format
289
327
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:
328
+
By default, the **Columns** property is set to automatically create the table columns based on the array items. To specify custom headers and values, follow these steps:
293
329
294
330
1. Open the **Columns** list, and select **Custom**.
295
331
296
332
1. In the **Header** property, specify the custom header text to use instead.
297
333
298
-
1. In the **Key** property, specify the custom value to use instead.
334
+
1. In the **Value** property, specify the custom value to use instead.
299
335
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.
336
+
To return values from the array, you can use the [`item()` function](../logic-apps/workflow-definition-language-functions-reference.md#item) with the **Create HTML table** action. In a `For_each` loop, you can use the [`items()` function](../logic-apps/workflow-definition-language-functions-reference.md#items).
301
337
302
-
1. On the designer toolbar, select **Code view**.
338
+
For example, suppose you want table columns that have only the property values and not the property names from an array. To return only these values, follow these steps for working in designer view or in code view. Here is the result that this example returns:
303
339
304
-
1. In the code editor, edit action's `inputs` section to customize the table output the way that you want.
340
+
```text
341
+
Apples,1
342
+
Oranges,2
343
+
```
305
344
306
-
This example returns only the column values and not the headers from the `columns` array by setting the `header` property to an empty value and dereferencing each `value` property:
345
+
#### Work in designer view
307
346
308
-
```json
309
-
"Create_HTML_table": {
310
-
"inputs": {
311
-
"columns": [
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')"
323
-
}
324
-
}
325
-
```
347
+
In the action, keep the **Header** column empty. On each row in the **Value** column, dereference each array property that you want. Each row under **Value** returns all the values for the specified property and becomes a column in your table.
326
348
327
-
Here is the result that this example returns:
349
+
1. Under **Value**, on each row that you want, click inside the edit box so that the dynamic content list appears.
328
350
329
-
```text
330
-
Results from Create HTML table action:
351
+
1. In the dynamic content list, select **Expression**.
331
352
332
-
Apples 1
333
-
Oranges 2
334
-
```
353
+
1. In the expression editor, enter this expression that specifies the array property value that you want, and select **OK**.
354
+
355
+
`item()?['<array-property-name>']`
356
+
357
+
For example:
358
+
359
+
*`item()?['Description']`
360
+
*`item()?['Product_ID']`
361
+
362
+

363
+
364
+
1. Repeat the previous steps for each array property that you want. When you're done, your action looks like this example:
1. To resolve expressions into more descriptive versions, switch to code view and back to designer view, and then reopen the collapsed action:
369
+
370
+
The **Create HTML table** action now appears like this example:
371
+
372
+

373
+
374
+
#### Work in code view
375
+
376
+
In the action's JSON definition, within the `columns` array, set the `header` property to an empty string. For each `value` property, dereference each array property that you want.
377
+
378
+
1. On the designer toolbar, select **Code view**.
379
+
380
+
1. In the code editor, in the action's `columns` array, add the empty `header` property and this `value` expression for each column of array values that you want:
381
+
382
+
```json
383
+
{
384
+
"header": "",
385
+
"value": "@item()?['<array-property-name>']"
386
+
}
387
+
```
388
+
389
+
For example:
390
+
391
+
```json
392
+
"Create_HTML_table": {
393
+
"inputs": {
394
+
"columns": [
395
+
{
396
+
"header": "",
397
+
"value": "@item()?['Description']"
398
+
},
399
+
{
400
+
"header": "",
401
+
"value": "@item()?['Product_ID']"
402
+
}
403
+
],
404
+
"format": "HTML",
405
+
"from": "@variables('myJSONArray')"
406
+
}
407
+
}
408
+
```
409
+
410
+
1. Switch back to designer view, and reopen the collapsed action.
335
411
336
-
In the designer, the**Create HTML table** action now appears this way:
412
+
The**Create HTML table** action now appears like this example, and the expressions have resolved to more descriptive versions:
337
413
338
-

414
+

339
415
340
416
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