cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leeyuh
Regular Visitor

Grouping list items into an html table under certain criteria and send email

Hello community!

 

My team has a share point list with the following columns:

Batch IDItem nameProviderCost
AB01Apple 1A50
AB01Apple 2A90
AB01Apple 3B10
AB03Apple 4A95
AB04Apple 5A78

 

I want to create a workflow when items under the same batch ID are created on the list, an email can be sent to each provider. In the email, I want to create an html table listing all the item name and cost under that provider. 

Email for Provider A - AB01

Item nameCost
Apple 150
Apple 290

 

Email for Provider A - AB03

Item nameCost
Apple 495

 

Email for Provider A - AB02

Item nameCost
Apple 578

 

Email for Provider B - AB01

Item nameCost
Apple 310

 

I am stuck in the step of grouping items under the same batch ID in one html table and one email. 

Could anyone help me out?

 

 

 

1 REPLY 1

Hi @leeyuh 

 

You can use filter arrays for this. 

 

Initialize an array variable to store all the distinct values for the column to group on. Then use an apply to each loop to iterate over each of the item in this array and add a filter array action to get only the rows that have the value in the current item for that column. You can then use the create HTML table action to create the html table. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS! 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,778)