web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to update Leave b...
Power Automate
Unanswered

Flow to update Leave balance SharePoint list based on some criteria

(0) ShareShare
ReportReport
Posted on by 16

Hi All,

I am new to power automate & i need to run a flow every month which can perform the below action:

Scenario:  There are two SharePoint List: one is Employee detail & other one is Leave Balance in the following format:
Leave Balance

EmployeeEmailFiscal YearPaid Leave BalanceSick Leave Balance
a@xyz.com2021needs to be updated monthlyneeds to be updated monthly
b@xyz.com2021needs to be updated monthlyneeds to be updated monthly

 

Employee Details

EmpEmailJoining DateExpected Confirmation DateActual Confirmation Date
a@xyz.com01-01-202131-03-2021 (i.e. 3 months from joining)31-03-2021(i.e. 3 months from joining)
b@xyz.com01-05-202031-10-2020((i.e. 5 months from joining))30-11-2020(i.e. 6 months from joining)

 

Total annual leaves are 15 for Paid & 6 for SickLeave.

During the probation period leave balance will be 0. But once probation is completed then Paid Leave balance should be updated monthly  as:

for 1 year of service

previous  balance  +  15/ (number of months in a year - total months taken for confirmation)

==> 15/(12-3) = 15/9 (when employee is getting confirmed in 3 months) 

After completion of 1 year of service, paid leave should be updated monthly as
previous  balance  +  15/ 12

 

Similarly, Sick Leave balance should be updated as 

for 1 year of service =

previous  balance  + 06/ (number of months in a year - total months taken for confirmation)

==> 06/(12-3) = 06/9 (when employee is getting confirmed in 3 months)

 

After completion of 1 year of service, Sick leave should be updated monthly as ==
previous  balance  +  6/ 12



Also, as paid leaves can be carry forward annually with the limit of 42 leaves so that needs to be taken care.

Could you please help? its urgently required.
Note: Fiscal Year is from April to March.

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Prachi_Jn 

    There is quite a bit that you'll need to do.

    Here is how I would approach it:

    1. Use a recurrence trigger on a Flow that fires once a day
    2. Find the items in your Employee details list that meet your criteria
      1. Use a filter query - here is a link for more info
    3. Loop through your results
      1. For each result, find the related record in the leave balance list 
        1. Use a filter query to find each item
      2. Update as appropriate

    My suggestion is to give it a try - get as far as you can and post here when you get stuck along with screen shots of your Flow.

     

     

  • Prachi_Jn Profile Picture
    16 on at

    Thanks Scott for looking into my query & suggesting an approach.  I am surely gonna try this approach & will update.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard