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 Apps / how to add Leave Balance
Power Apps
Answered

how to add Leave Balance

(0) ShareShare
ReportReport
Posted on by 36

Scenario:
I have built a Leave Request system for my office. Below is the setup:

SharePoint Lists:

  1. Leave Request
  1. Leave Balance

Everything is working fine, and the approval process is managed via Power Automate.

Requirement:
I need to manage users' leave balances. When a leave request is approved, the corresponding leave balance should be deducted. We have three types of leave:

  • Annual Leave: 14 days
  • Medical Leave: 7 days
  • Casual Leave: 7 days

Can anyone guide me on how to implement this functionality?

  • Verified answer
    Shravyashree_Shetty Profile Picture
    55 on at
    Hi,
     
    Have a column "LeaveType" in the "Leave Request" List 
    Leave Balance List Updation After every Request - 
    Code for patch after the Approval : 
     
     
    Patch(LeaveBalance, Lookup(LeaveBalance, 'Name of Employee' = User().Displayname),
    { 
    'Annual Leave' : If(Leavetype = "Annual Leave", Lookup(LeaveBalance, 'Name of Employee' = User().Displayname).AnnualLeave - ApplyDays.Value, Lookup(LeaveBalance, 'Name of Employee' = User().Displayname).AnnualLeave)
     
    .
    .
    .(Continue the same for other leave types)
    })
     
    At the end of every year, You can Trigger a flow to Update the Leaves in the Leave Balance List
     
     
     
     
    PLEASE GIVE THIS ANSWER A THUMBS UP, IF THIS HELPS AND ACCEPT THIS ANSWER AS A SOLUTION FOR FUTURE REFERENCE!

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 Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard