Good afternoon all,
I am looking for a way to present an array of arrays in a printable, human readable way.
For example, I have a "Get Items" action which returns multiple results, and for each of those results, a second "Get Items" action runs which also returns multiple results. What I would like is to repeat a table of defined structure, 1-n times.
I am comfortable with Word Templates and repeating sections, but this limits me to a single table with 1-n rows. This is slightly different to my current needs.
The array of arrays is similar to the below in structure, with the number of "Thing's" being variable;
[
{
"Thing Name": "Thing 1",
"Thing Contents": [
{
"Property 1": "123",
"Property 2": "labore et dolore",
"Property 3": "magna aliqua."
},
{
"Property 1": "456",
"Property 2": "Ut enim ad",
"Property 3": "minim veniam,"
},
{
"Property 1": "789",
"Property 2": "quis nostrud exercitation",
"Property 3": "ullamco laboris nisi"
}
]
},
{
"Thing Name": "Thing 2",
"Thing Contents": [
{
"Property 1": "ABC",
"Property 2": "Lorem ipsum",
"Property 3": "dolor sit amet"
},
{
"Property 1": "DEF",
"Property 2": "consectetur adipiscing",
"Property 3": "elit, sed do"
},
{
"Property 1": "GHI",
"Property 2": "eiusmod tempor",
"Property 3": "incididunt ut"
}
]
},
{
"Thing Name": "Thing 3",
"Thing Contents": [
{
"Property 1": "A1",
"Property 2": "ut aliquip ex ea",
"Property 3": "commodo consequat"
},
{
"Property 1": "B2",
"Property 2": "Duis aute irure",
"Property 3": "dolor in reprehenderit"
},
{
"Property 1": "C3",
"Property 2": "in voluptate velit",
"Property 3": "esse cillum dolore eu"
}
]
}
]
edit: Correction to structure, thankyou @eliotcole
This information needs to be presented in a human readable format, such as the two examples below;
----------------------------------------------
Merged table,
Thing 1 |
Property 1 | Property 2 | Property 3 |
123 | labore et dolore | magna aliqua. |
456 | Ut enim ad | minim veniam, |
899 | quis nostrud exercitation | ullamco laboris nisi |
Thing 2 |
Property 1 | Property 2 | Property 3 |
ABC | Lorem ipsum | dolor sit amet |
DEF | consectetur adipiscing | elit, sed do |
GHI | eiusmod tempor | incididunt ut |
Thing 3 |
Property 1 | Property 2 | Property 3 |
ABC | ut aliquip ex ea | commodo consequat |
DEF | Duis aute irure | dolor in reprehenderit |
GHI | in voluptate velit | esse cillum dolore eu |
------------ OR ---------------------
Discrete table repeated 1-n times.
Thing 1
Property 1 | Property 2 | Property 3 |
123 | labore et dolore | magna aliqua. |
456 | Ut enim ad | minim veniam, |
899 | quis nostrud exercitation | ullamco laboris nisi |
Thing 2
Property 1 | Property 2 | Property 3 |
ABC | Lorem ipsum | dolor sit amet |
DEF | consectetur adipiscing | elit, sed do |
GHI | eiusmod tempor | incididunt ut |
Thing 3
Property 1 | Property 2 | Property 3 |
ABC | ut aliquip ex ea | commodo consequat |
DEF | Duis aute irure | dolor in reprehenderit |
GHI | in voluptate velit | esse cillum dolore eu |
-----------------------------------------
The only solutions I can currently see are;
------------------------------------------
Limit to a 1d array and output a table such as,
Thing 1 / Item 1 / Property 1 | 123 |
Thing 1 / Item 1 / Property 2 | labore et dolore |
Thing 1 / Item 1 / Property 3 | magna aliqua. |
Thing 1 / Item 2 / Property 1 | 456 |
Thing 1 / Item 2 / Property 2 | Ut enim ad |
Thing 1 / Item 2 / Property 3 | minim veniam, |
and so on...
This looks awful, and does not meet the requirements.
--------------OR------------------------
Create a document per array item (single page document, each containing a discrete table), and merge the pages to a single document in another action.
Page 1.
Thing 1
Property 1 | Property 2 | Property 3 |
123 | labore et dolore | magna aliqua. |
456 | Ut enim ad | minim veniam, |
899 | quis nostrud exercitation | ullamco laboris nisi |
Page 2.
Thing 2
Property 1 | Property 2 | Property 3 |
ABC | Lorem ipsum | dolor sit amet |
DEF | consectetur adipiscing | elit, sed do |
GHI | eiusmod tempor | incididunt ut |
Page 3.
Thing 3
Property 1 | Property 2 | Property 3 |
ABC | ut aliquip ex ea | commodo consequat |
DEF | Duis aute irure | dolor in reprehenderit |
GHI | in voluptate velit | esse cillum dolore eu |
This will leave huge amounts of blank space on each page, and is not a good solution to the problem.
---------------------------------------------------
I have tried nesting repeating sections in the word template, however the connector only recognizes the first control.
Any suggestions would be greatly appreciated. Thanks in advance.
Thankyou to @eliotcole for suggestions.
Screen shots of flow below for reference.