logo
search
Others

Automate Approved Leave Totals in SharePoint Lists with Power Automate

Huma Ashraf ChHuma Ashraf Ch Sep 27, 2026 869 views

Question details

How to automatically add approved leave days from a SharePoint Leave Requests list to a user's running total in a Holiday Allowance list.

Automate Approved Leave Totals in SharePoint Lists
Product
SharePoint / Power Automate
Device & OS
not provided
Scenario
Managing employee leave requests dynamically so that balances are updated automatically across different SharePoint lists once a request is approved.
Observed behavior
The flow needs to trigger when a leave request is marked as Approved, locate the specific user, and update their total leave balance without duplicating the addition if the request is later edited.
Before you start

Ensure you have Site Owner or Edit permissions for both the Leave Requests and Holiday Allowance SharePoint lists, as well as access to create and manage workflows in Power Automate.

Solution 1Recommended

Build a Condition-Based Flow to Update Leave Allowances

Set up a Power Automate flow that triggers on item creation or modification, checks for an 'Approved' status, and updates the user's running total in the corresponding list.

By utilizing SharePoint triggers and actions in Power Automate, you can seamlessly integrate two separate lists. This prevents manual data entry and ensures holiday allowances are always up to date.

1
Set the trigger

Create a new automated flow and select the 'When an item is created or modified' SharePoint trigger. Point the Site Address and List Name to your Leave Requests list.

2
Check the approval status

Add a 'Condition' control step. Set it to check if the 'Status' dynamic content from the trigger is equal to 'Approved'.

3
Retrieve the user's current allowance

In the 'If yes' branch, add the 'Get items' SharePoint action. Connect it to the Holiday Allowance list and use an OData Filter Query (e.g., UserEmail eq 'RequestedByEmail') to find the matching user.

4
Calculate the new total

Use a 'Compose' data operation or an expression in the next step to add the 'Days taken' value from the Leave Request to the 'Total days' retrieved from the Holiday Allowance list.

5
Update the allowance list

Add the 'Update item' SharePoint action. Use the Item ID from the 'Get items' step (which will automatically place it in an 'Apply to each' loop) and insert your newly calculated total into the Total Days field.

Build a Condition-Based Flow to Update Leave Allowances
Preventing Duplicates: To prevent adding the same request multiple times if an already-approved item is edited, add a 'Processed' Yes/No column to your Leave Requests list. Update this column to 'Yes' at the end of your flow, and add a trigger condition so the flow only runs when 'Processed' is 'No'.
Free Microsoft Office alternative

Manage HR and Leave Tracking Effectively with WPS Office

If you are managing HR data, leave trackers, and employee schedules, WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office. With a familiar user interface and seamless migration, you can build powerful automated spreadsheets for leave tracking without the steep learning curve.

  1. 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open Your Existing Tracker: Seamlessly open your existing Excel (.xlsx) leave tracking spreadsheets directly in WPS Spreadsheet.
  3. 3. Apply Built-in Formulas: Use built-in functions like SUMIF and VLOOKUP to easily automate holiday balances based on approval statuses without complex workflows.
100% compatible with Microsoft Excel (.xlsx) formats for your existing leave trackersFree, lightweight suite that uses minimal system resourcesFamiliar tabbed user interface ensures a zero learning curve for seamless migrationBuilt-in advanced spreadsheet formulas to automatically calculate holiday balances
microsoft office alternative - wps office

Frequently Asked Questions

How do I avoid an infinite loop in Power Automate when updating SharePoint lists?

Infinite loops occur when a flow updates the same list that triggers it. To prevent this, use Trigger Conditions in the flow's settings to ensure it only runs when a specific field (like 'Status') is changed to 'Approved', rather than on every single modification.

Can I notify employees when their leave balance is updated?

Yes. You can add a 'Send an email (V2)' action from the Office 365 Outlook connector at the end of your 'If yes' branch. Use dynamic content to include the user's email, approved days, and new total balance.

What happens if a user is not found in the Holiday Allowance list?

If 'Get items' returns no results, the subsequent update step will fail or skip. You can add a condition checking the length of the 'Get items' output. If it equals 0, use a 'Create item' action to initialize the user's record before updating their balance.