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.
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.
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?
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..
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>
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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.