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
yashag2255
Dual Super User II
Dual Super User II

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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,203)