Hello,
I have a SharePoint list form customized using the Power Apps form. In the back-end, I have a flow that will trigger once the item is created and after that, an email will be sent to the approval to approve (within the Power Apps form, so I am not using send an approval action).
After the user receives the email, I have added a "Do Until action" that checks if DM (Direct Manager) field in SharePoint is approved or rejected. Once the field is updated to the approval response it should be escalated to another approval.
The problems are the following:
What I want to achieve is the following:
I have used the following condition inside the "Do Until":
@or(equals(triggerBody()?['DirectManager']?['Value'], 'Approved'),equals(triggerBody()?['DirectManager']?['Value'], 'Rejected'))
Please have a look at the flow result screenshots:
Trigger result
The value returned from the DirectManager field is open (This is a default value when the item is created), and I am mapping this field value inside the Do until condition.
What is the best way to achieve the above scenario?
Can please someone provide an example and explain it in detail?
Any help will be greatly appreciated.
Solved! Go to Solution.
Hi @Julien2 ,
The problems are the following:
For the first issue, please take a try to add a Delay action inside the do until so the Do until wouldn't send the 60 emails quickly.
For the second issue, you should add a "Get item" action inside the Do until to get the new item data, and you should use the DirectManager Value dynamic from the "Get item" action in the Do until and the Condition, instead of use the dynamic from the trigger, since the trigger data would be same not the newest data.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Julien2 ,
The problems are the following:
For the first issue, please take a try to add a Delay action inside the do until so the Do until wouldn't send the 60 emails quickly.
For the second issue, you should add a "Get item" action inside the Do until to get the new item data, and you should use the DirectManager Value dynamic from the "Get item" action in the Do until and the Condition, instead of use the dynamic from the trigger, since the trigger data would be same not the newest data.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-alzhan-msft ,
Thanks for your suggestions.
The first problem was solved, but unfortunately, the Do Until action runs successfully without checking for the condition whether if it's approved or rejected and it gets again escalated to the second approval, knowing that I have used a "Get Item" action and mapped the "Direct Manager Value" inside the Do until condition to check if it's "Approved".
Please have a look at the below screenshots:
Any suggestions to solve the second problem issue?
Looking forward to your response.
Thank you!
We are having very similar issues and would like to see how you resolve yours.
We have a list in SharePoint, where we want to send alerts/approval emails to a staff member. If they dont change the status of the item in SharePoint, it sends a reminder every day until they do.
The sending of the emails appears to work correctly but changing the status makes no difference and the Flow doesnt pick up the changes value. We have added in Get Item but it still returns old data.
Hello @Browncdt ,
I have resolved my issue by implementing the following:
After these steps, you can set the next action that is outside the do until action to run after Do until has succeeded or has timed out.
Please consider taking a try with the above solution, then check if the issue is solved.
Thank you!
Many thanks for the quick reply. This is what I have in place currently; (Lead/Owner is a user picker and can be multiple people)
Basically I have a dropdown list (Status) that I am trying to get the updated value of. But the new value doesn't seem to get picked up.
Thanks again.
Hi @Browncdt ,
Could you please hover on Status Value inside the Do until and send me a screenshot?
Besides, try to put the Get-Item action outside the apply to each loop and test again.
Thank you!
Many thanks.
Yeah moving it doesnt appear to make any difference.
This is my Status Value hover. This is from a Choice column Default of 'New'.
Hello @Browncdt ,
Thank you for providing a screenshot.
As I can see the Status Value is mapped from the TriggerOutputs and not from the Get-Item action.
As a fixed solution please make sure you are mapping the Status Value from the Get-Item action:
Let me know the output result based on what I've mentioned above.
Thank you!
Brilliant thank you.
I think that might have done the trick. My Flow now goes through the Succeeded phase. I think I still have a bit of tinkering to do, but that seems to do what it should.
Many thanks for your help!
Hi @Browncdt ,
You are the most welcome, if I have answered your question then please consider Accept it as the solution to help the other members find it more.
Have a nice weekend!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
77 | |
18 | |
17 | |
14 | |
11 |
User | Count |
---|---|
133 | |
33 | |
31 | |
31 | |
24 |