cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
faisalsns
Level: Powered On

Iterating over array and sending mail with html table when array element condition is met

I have a Kusto query which retrives data in one single row for - error codes along with their respective error count. Using Flow i am able to populate an array and added the 'interesting' error codes with some user friendly text appended.

 

How can i iterate over the array and create a html table so that the user friendly text values is in the first column and the error count is in the 2nd column and send it in the email body? Also if possible i'd like to add headings for the html table columns.

2 REPLIES 2
Highlighted
Super User
Super User

Re: Iterating over array and sending mail with html table when array element condition is met

Hello @faisalsns ,

 

There is a nice action for this to transform array into html table:

Flow_HTML.jpg

 

And for this action under advanced opitons there is possible to put custom headers to your table and pick columns you want:

Flow_HTML2.jpg

I also suggest to use css styling if you want to send it via email. You can be inspired for example here https://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy

 

BR
Pavel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

faisalsns
Level: Powered On

Re: Iterating over array and sending mail with html table when array element condition is met

In your screenshot are "Distrikt" and "Storesstring" variables? For me these are calculated dynamically by splitting the error code from the array. The limitation am facing is i need to use a iteration to create the html table i.e. with 2 columns as described earlier but the output of the html table is not visible outside the "Apply to each" block. 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 507 members 4,475 guests
Please welcome our newest community members: