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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calculating and displa...
Power Apps
Unanswered

Calculating and displaying leave balances for different leave types

(0) ShareShare
ReportReport
Posted on by 107

Hi all. Apologies for starting a new thread for something which has already been discussed here -> https://powerusers.microsoft.com/t5/Building-Power-Apps/Creating-a-List-of-All-Employees-Leaves-and-Calculating-their/m-p/682414#M218172, but I'm really struggling and not able to get this right 😞

 

I downloaded and followed RandyHayes great app and instructions, however I am still struggling and I'm really hoping someone could assist me, please. I've been battling with this for quite a while now.

Perhaps I just need to edit the formulas of Randy to fit in with my app, but I'm not sure what to do. I'm a new user and lost 😞

 

Basically, I have 1 SharePoint List, called CWLeaveRequests with the following columns:

- Name and Surname

- Start Date

- End Date

- Type of Leave

- Status

- Supervisor Notes

- Staff Notes

- Number of Days

- Attachments

- Supervisor

- Start Year (I added this as per Randy Hayes suggestion)

 

On my App, I have 4 screens namely:

- HomeScreen

- RequestFormScreen

- SuccessScreen

- RequestHistory

 

Currently, when I create a new leave request, it adds the data to my SharePoint list, and then a flow runs which emails a supervisor to approve. If approved/rejected it updates the list. So far, that all works 100%.

 

My different leave types are as follows:

- Annual Leave

- Sick Leave (provide supporting evidence when applicable)

- Study Leave (provide supporting evidence)

- Family Responsibility Leave (provide supporting evidence)

- Unpaid Leave

- Maternity Leave

- Paternity Leave (provide supporting evidence)

 

Now, I want to display the different leave types with their balances on the RequestFormScreen and I'd really really appreciate some help with the coding and where to add it, etc.

If supervisor approves, it deducts the number of days that was requested and if rejected, the balance stays the same for that particular leave type.

If leave requested exceeds the leave balance (for the particular leave type) staff members gets a "sorry, leave exceeded " message or pop up of sorts.

I would also like the annual leave that is not taken by a staff member to be able to carry over to their leave balance for the next year.

 

At our company, we get 1.25 days per month (15 total days per year) for annual leave so this can probably be hard coded somewhere, not sure where though

Sick Leave is 30 days over 3 years

Family Responsibility Leave is 3 days per year

 

Please guys. I'll be super grateful if anyone could help.

 

I can post screenshot of my app and/or flow as well as my SharePoint list if need be. 

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard