Hey guys I have built an annual leave / vacation flow and how it works is when a new item is created in the list it goes for approval, once approved it then calculates the days taken and the days requested from the remaining balance, it then notifies the employee by email with the approval status and there remaining balance of days, it then adds it to a calendar for viewing, BUT the issue im having is what if an employee cancels there annual leave, and lets say deletes there item from the list how would I then re calculate the daystaken back to the balance and delete the days on the calendar I NEED HELP cant figure this out any help is much appreciated guys, please find my flow below
Hi @Rhys_Q,
I would create a separate flow for this which is using the deleted item trigger. The only tricky bit is probably deleting that related AnnualLeaveCalendar item. Are you in anyway linking to the original request in that list?
Below is an example of that approach btw.
1. Add a When an item is deleted action. Configure it to use the same list as in your flow.
2. Add a couple of compose actions and use the same approach to calculate the NewBalance. But instead of sub use add for the NewBalance action:
add(outputs('Compose_CurrentBalance'),outputs('Compose_DaysRequested'))
Hope this helps a bit?
Hi @Expiscornovus thanks for this i will try this now, if you have any luck with deleting the item off the calendar it would be great as it helps out a lot as i am still new to power automate and have only been using it for about 1 1/2 months
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
31 | |
28 | |
27 | |
21 | |
10 |