cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Dynamically add a new column to an existing 2D array

I need to dynamically build a 2D array with column names established dynamically and values assigned to each.  I have the flow to find/establish the column names and values.  I can dynamically create this with append to array variables and the output looks like this:

[automated flows

{"FileNumber": "123"},

{"Customer": "Test Company LLC"},

{"LoanAmount": "$100,000.00"}

]

 

I need the output in flat single record so it can be used to populate a sharepoint list with a single expression (example at bottom).  The output should to look like this:

[

{

"FileNumber": "123",

"Customer": "Test Company LLC",

"LoanAmount": "$100,000.00"

}

]

 

So, I need a way to either convert the first output to the second or create the second output dynamically. 

 

Single expression example I am using to populate SharePoint: if(contains(variables('strFieldNames'),'FileNumber'),if(empty(variables('arrEmailResults')[0]['FileNumber']),'',variables('arrEmailResults')[0]['FileNumber']),'')

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: Dynamically add a new column to an existing 2D array

Hello @JO_SB 

 

Could you share a screenshot of your flow.

To better assist, I would like to see how you are getting the above values.

 

Thanks





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

Apparently not,  I can't figure out how to upload the screen shots to add it to the post.

Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

1122334455

Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

Sorry for the delay, the weekend took all my attention.  The previous post has the screen shots of the flow you where asking for.  The initialize variable (arrFieldToEmailRelationship) step contains the relevant information to tie the email and the SharePoint list together.

Highlighted
Super User III
Super User III

Re: Dynamically add a new column to an existing 2D array

Hello @JO_SB 

 

Is the email that this flow gets triggered on, is the email formatted the same every time?

 

Or can the body of the email be different?





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

No, it may be missing lines or have additional lines I don't need and may be in different order.  The only consistency I have is each the data is separated by a line feed and each line has a colon separating the identity from the value.

Highlighted
Super User III
Super User III

Re: Dynamically add a new column to an existing 2D array

Thanks @JO_SB 

I know you have posted a example in the first post. But could you post a couple example emails that you would receive.

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

That information is confidential so I can't post a sample of the email.  But keep in mind I can parse the email with the flow as you see it, so that is not the problem.  I need help getting the parsed info into a SharePoint list.

Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

Anyone come up with a solution to my problem?

Highlighted
Frequent Visitor

Re: Dynamically add a new column to an existing 2D array

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,888)