Hi @MO_912 ,
You can use a combination of conditions and loops. Here's a basic outline:
1. Initial Approval Flow:
• Start with your approval flow.
• If the item is rejected, store the rejection information in a variable or a field in your SharePoint list.
2. Check for Rejection:
• Add a condition after the approval step to check if the item was rejected based on the stored information.
3. Re-Application Loop:
• Inside the "No" branch of the condition, add a loop (e.g., "Apply to each").
• Configure the loop to iterate until a certain condition is met or a specific number of attempts is reached.
4. Create a New Approval:
• Inside the loop, create a new approval for the same item or a copy of the item.
• Use dynamic content from the original item to populate the new approval request.
5. Wait for Approval:
• Wait for the new approval response.
6. Check Approval Result:
• After the wait, check if the new approval was accepted or rejected.
7. End or Continue Loop:
• If accepted, you can end the loop.
• If rejected, update the rejection information and let the loop iterate again.
Here's a simplified example in pseudo-code:
Trigger: When an item is created or modified
Initialize rejectionCount = 0
Approval Step:
If Approval Rejected:
Set rejectionCount = rejectionCount + 1
Update SharePoint item with rejection information
Check Rejection:
If rejectionCount < MaxAttempts:
Re-Application Loop:
Create New Approval for the item
Wait for Approval Response
If Approval Accepted:
End Loop
If Approval Rejected:
Set rejectionCount = rejectionCount + 1
Update SharePoint item with rejection information
Else:
Notify user that maximum attempts reached