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

Display Multiple Sharepoint items in one approval

Hi,

 

I am trying to build an approval flow from data stored in a parent and child SharePoint list.

I would like the Approval to display fields from the parent list and also multiple linked items from the child list.

 

The parent list contains the master order details while the child list contains details of the items in the order. This could be 1 item or 50+ items. 

The lists are linked by the columns ID and ID1 which contain the same identifying ID number.

 

I have so far built the flow so it runs as follows:

1) When a new item is created in the parent list.

2) Get items from the child list - using Filter Query - Title eq ID

3) Start and Wait for an approval

 

This works great in pulling the first item in the child list but if there is more than one item with the same ID I would like those displayed also. A bonus would be if they could be displayed in a neat table or something similar.

 

Approval flow 1.PNG

 

Approval flow 2.PNG

 

Many thanks

 

6 REPLIES 6
PrasadAthalye
Super User
Super User

Please refer below. Please Generate an HTML table that you would like to use and use it in Approval Action. 

You may not need a loop. I am using SendEmail. You can use the Start approval action instead.

 

PrasadAthalye_0-1615305010848.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye 

I have tried that and I get the following in my approval email. Do you know how I can fix this? 

Will this also show multiple item fields form the SP List?

 

Approval email with table.PNG

OK. HTML tags won't work within Approval Task. So Please remove the HTML table action. Declare one string variable outside using Initialize variable and set values using table markups as given in below link..

https://docs.microsoft.com/en-us/power-automate/approvals-markdown-support

 

E.g. in Initialize variable you would write like this for 2 columns--> | ID | Total | & on the next line |-----------|:-----------:|

 

then inside the loop, use Append to a String variable and append like below...

| Cell B1 | Cell B2 | Cell B3 |<br>

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye 

 

The table has worked great thank you.

 

Can you explain a bit more how to use Append to string a variable?

Will this display multiple rows with the same ID?

Yes, If your ListItem returns multiple rows, you can append it to the String variable. It should generate a list of them which you can use in flow approval action.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
StewG
Helper I
Helper I

Hi, Sorry you may have to spell out to me how to do that. I have not really used variables before.

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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

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.

Users online (2,270)