cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
devgianart
Helper I
Helper I

HELP! How do I convert an arrays into rows

I have an array variable that stores contents as follows:

[
     ["Colum1", "Column2", "Colum3"], ["A", "B", "C"], ["D", "E", F"]
]

 

How do I convert this into a usable HTML table with a column header of  the first array?

 

The result would look like the following:

devgianart_0-1623236442570.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Like this:

2021-06-09_12-08-08.png

Somewhat difficult to explain, so I copied the actions in to a scope for you:

{"id":"b36d4ce8-5aaf-4abb-977b-31bf-a7ac4850","brandColor":"#8C3900","connectionReferences":{},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Scope","operationDefinition":{"type":"Scope","actions":{"ArrayOfArrays":{"type":"Compose","inputs":[["Colum1","Column2","Colum3"],["A","B","C"],["D","E","F"]],"runAfter":{}},"Select":{"type":"Select","inputs":{"from":"@skip(outputs('ArrayOfArrays'),1)","select":{"@{outputs('ArrayOfArrays')[0][0]}":"@item()[0]","@{outputs('ArrayOfArrays')[0][1]}":"@item()[1]","@{outputs('ArrayOfArrays')[0][2]}":"@item()[2]"}},"runAfter":{"ArrayOfArrays":["Succeeded"]}}},"runAfter":{}}}

Just copy the code above, then go into a new flow, add a new action, go to "My Clipboard". Press CTRL-V and then you will see the scope appear. You will then see how I reformatted it.

View solution in original post

2 REPLIES 2
Paulie78
Super User
Super User

Like this:

2021-06-09_12-08-08.png

Somewhat difficult to explain, so I copied the actions in to a scope for you:

{"id":"b36d4ce8-5aaf-4abb-977b-31bf-a7ac4850","brandColor":"#8C3900","connectionReferences":{},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Scope","operationDefinition":{"type":"Scope","actions":{"ArrayOfArrays":{"type":"Compose","inputs":[["Colum1","Column2","Colum3"],["A","B","C"],["D","E","F"]],"runAfter":{}},"Select":{"type":"Select","inputs":{"from":"@skip(outputs('ArrayOfArrays'),1)","select":{"@{outputs('ArrayOfArrays')[0][0]}":"@item()[0]","@{outputs('ArrayOfArrays')[0][1]}":"@item()[1]","@{outputs('ArrayOfArrays')[0][2]}":"@item()[2]"}},"runAfter":{"ArrayOfArrays":["Succeeded"]}}},"runAfter":{}}}

Just copy the code above, then go into a new flow, add a new action, go to "My Clipboard". Press CTRL-V and then you will see the scope appear. You will then see how I reformatted it.

View solution in original post

Thanks sir @Paulie78  you nailed it. I thought I'm having fever figuring out how to do this

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,487)