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']),'')
Solved! Go to Solution.
Please see this link for an acceptable answer to my problem above.
https://powerusers.microsoft.com/t5/Building-Flows/Changing-an-array/m-p/528899#M67743
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
Proud to be a Flownaut!
Apparently not, I can't figure out how to upload the screen shots to add it to the post.
1
2
3
4
5
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.
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?
Proud to be a Flownaut!
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.
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.
Proud to be a Flownaut!
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.
Anyone come up with a solution to my problem?
Please see this link for an acceptable answer to my problem above.
https://powerusers.microsoft.com/t5/Building-Flows/Changing-an-array/m-p/528899#M67743
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
127 | |
54 | |
38 | |
26 | |
21 |