Good day,
I am bit new in power automate. I am trying to send an email from a SharePoint list with get items.
I have the following situation. I have multiples lines with a purchase order in common.
Ex:
Purchase Order | Posting Date | Cost |
444413 | 1/12/2021 | $300 |
456135 | 1/11/2021 | $513 |
444413 | 1/12/2021 | $25 |
341564 | 1/11/2021 | $1351 |
The idea is to group in the email the purchase orders and send the notification. Also, the posting date should be the same.:
Ex:
Purchase Order | Posting Date | Cost |
444413 | 1/12/2021 | $300 |
444413 | 1/12/2021 | $25 |
1. How can I make the path within SharePoint to group the purchase orders?
2. How can I guarantee for the second iteration not to send again the email?
I hope someone can help me please!
Thank you in advance!
Solved! Go to Solution.
I have simplified the flow as below:
Union Compose Data Operation:
PurchaseOrderPO Compose:Expression: items('Apply_to_each')?['Purchase']
Hi @redhoezth7
You can use the Order By Expression on your Get Items as below:
And then Use the Create HTML Table action to generate an HTML table and pass its Output to the email and hence avoiding sending email twice
Hope this Helps!
Hi Mira, thank you for your response.
Just two questions.
1. What do you have in outcome when you filter the query?
2. If I have the SharePoint list with different purchase orders similar, it will send the email for each one?
Ex:
Purchase Order | Posting Date | Cost |
444413 | 1/12/2021 | $300 |
456135 | 1/11/2021 | $513 |
444413 | 1/12/2021 | $25 |
341564 | 1/11/2021 | $1351 |
341564 | 1/11/2021 | $1360 |
It will send:
Email 1:
Purchase Order | Posting Date | Cost |
444413 | 1/12/2021 | $300 |
444413 | 1/12/2021 | $25 |
Email 2:
Email 1:
Purchase Order | Posting Date | Cost |
341564 | 1/11/2021 | $1351 |
341564 | 1/11/2021 | $1360 |
Thank you!
Hi @redhoezth7
Please check the below article ; it describes the same scenario you are after
Hi Mira,
Again, thank you for your response.
I have tried that solution, however, I am facing an issue with the filter array.
I followed step by step the solution, but the filter is not working and is in blank.
Do you know what could it happened?
Thank you!
Have you examined the flow history run as this might give you am idea what is going wrong?
If you can post full screens of your flow / flow history run .. I am happy to help!
Sure, I will share with you my flow run:
In this step, I will remove duplicates.
Then I will start apply to each for each PO:
And here is the filter Array
Let me know if it is enough information.
I have simplified the flow as below:
Union Compose Data Operation:
PurchaseOrderPO Compose:Expression: items('Apply_to_each')?['Purchase']
User | Count |
---|---|
88 | |
37 | |
25 | |
13 | |
13 |
User | Count |
---|---|
121 | |
55 | |
36 | |
24 | |
21 |