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

Collate the output of my html table to create summary message

Hello, 

 

I have been searching to try and find a solution to my issue. 

 

I am trying to summarise the output of my data before it sends a message to teams/email etc. 

 

My flow looks like:

 

Step 1.jpgStep 2.jpgStep 3.pngStep 4.jpg

 

Once the html table is created, flow is sending an individual message for each condition that is true. I'd like to collate the information into one summary post. 

 

Any help is much appreciated, 

 

Craig

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: Collate the output of my html table to create summary message

Hi @craigmk1987 

This is what i mean

Initialize array variable inside the loop, Construct JSON object and append to the array variable

Mira_Ghaly_0-1596705207224.png

 

Then construct the HTML table as below

Mira_Ghaly_1-1596705296517.png

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

 

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
Highlighted
Memorable Member
Memorable Member

Re: Collate the output of my html table to create summary message

@craigmk1987

Are you adding the HTML table step inside or outside the apply to each? 

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Collate the output of my html table to create summary message

Flow is automatically inserting it into an "apply for each". I couldn't find a way to retrieve it from outside 🙂

Highlighted
Memorable Member
Memorable Member

Re: Collate the output of my html table to create summary message

@craigmk1987 

 

Because you are adding the display name inside the Create HTML and this is generated through the Loop

Mira_Ghaly_0-1596702144167.png

I am suggesting that you create an array inside your apply_to_each and set it with the values you like by constructing a Compose data operation in Json format:

{

"DisplayName": "Display Name Value",

"Property1": "Property 2 Value"

}

Append the output from the compose data operation to the array and then outside of the loop pass the array to the HTML table.

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Collate the output of my html table to create summary message

Thanks Mira, 

 

I'll give it a go - I'm learning and teaching myself as I go 🐵

Highlighted
Frequent Visitor

Re: Collate the output of my html table to create summary message

Mira, 

 

When you say

 

"Append the output from the compose data operation to the array and then outside of the loop pass the array to the HTML table"

 

I'm not entirely sure I understand what you mean. I've tried the following:

 

step 5.pngstep 6.png

 

What I don't understand is that when composing a operation I'm not sure how to retrieve the output which is why I've tried to replicate the "select" variable I had used previously.

 

When I add the table outside of the loop there is nothing that I can see that references something I can use (unless it's the current item?). If I try and use any of the "shift" connectors it creates a new apply to loop which will probably deliver the same result 

 

Thank you in advance

Highlighted
Memorable Member
Memorable Member

Re: Collate the output of my html table to create summary message

Hi @craigmk1987 

This is what i mean

Initialize array variable inside the loop, Construct JSON object and append to the array variable

Mira_Ghaly_0-1596705207224.png

 

Then construct the HTML table as below

Mira_Ghaly_1-1596705296517.png

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

 

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Collate the output of my html table to create summary message

Thank you Mira, 

 

This resolved the issue and delivered exactly what I wanted. 

 

Thank you !

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 (5,574)