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

Use output from create HTML table outside a Apply to Each

Hi


I have setup a flow that grabs an excel attachment sent in via Microsoft Form in which the content is parsed and a HTML table is created.
My issue is that I want to use the HTML table that’s created in other emails that are fired off further down the flow e.g. multiple approvals. It doesn’t appear in the dynamic content unless I move everything up to the Apply to Each, which I can’t do because of approvals further down.


Is there a way I can use HTML output and use it elsewhere in the flow? I’ve tried creating variables to no avail, I’m a beginner so probably doing something wrong.


Thanks

 

The example below. I can shift the email into the apply to each and I can select HTML output into the email. Several other approvals further down, so need to know if there's a way to do this.

NareshTakashi_0-1601312954044.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi!

Assuming your Apply to each iterates over more than one element... I would add just after the trigger an 'Initialize variable', type array, let's call it 'myHTMLTablesArray', value empty.

Now, inside the 'Apply to each', just after the 'Create HTML table', I would add an 'Append to array' , name 'myHTMLTablesArray', assign as its value 'Create HTML table' output from dynamic content menu.

 

But... If your 'Apply to each' always iterates once... I would declare the variable as 'string' , and use 'Set variable' instead of 'Append to array'

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi!

Assuming your Apply to each iterates over more than one element... I would add just after the trigger an 'Initialize variable', type array, let's call it 'myHTMLTablesArray', value empty.

Now, inside the 'Apply to each', just after the 'Create HTML table', I would add an 'Append to array' , name 'myHTMLTablesArray', assign as its value 'Create HTML table' output from dynamic content menu.

 

But... If your 'Apply to each' always iterates once... I would declare the variable as 'string' , and use 'Set variable' instead of 'Append to array'

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Helper I
Helper I

Hi @efialttes 

 

Thanks for your support, I have got it working!

I couldn’t set the initialize variable as ‘array’ but using your other suggestion of setting the variable as ‘string’ and using the ‘Set variable’ step did the trick.

Approvals doesn’t read the variable later down in the Flow, but then I created another variable (append to string variable) with the relevant Mark Downs and that also worked (seen your suggestion on another forum about that).

 

I do have another question around getting the variable into a Sharepoint list with the array broken down into individual columns, but I'll raise another query about that.

 

Cheers for your help!

 @NareshTakashi

Thanx for your kindness and Happy Flowing!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (3,594)