I have modified the Leave Template for a team within my company and this is working successfully. However, they require the ability to be able to book a half day's leave. I have looked at several posts within here asking the same question and have tried some of the recommended solutions but absolutely none of them work! This is the most recent one I tried but see that the person that raised it never got any further response when it didn't work for them either:
I understand that the calculation will need to be added under the start date picker but just cannot get anything to work.
I would really appreciate some guidance as I've spent hours on trying to find a solution.
Thank you in anticipation.
Can you share a bit more about your app? how you store the leave balance and or perhaps a screenshot of the app itself?
Seems like a quick checkbox + submit button fix (then again...perhaps not)
I've used the Leave Template in Powerapps which has pre-defined formulas (Leave1 attachment). I have successfully tweaked all the formulas and have it attached to a Sharepoint list rather than Excel which is what the template does.
The formula for the days sits behind the start leave date picker and is as follows:
If(LeaveStartDatePicker.SelectedDate <= LeaveEndDatePicker.SelectedDate,
Set(_inclusiveTotalDaysRequested, DateDiff(LeaveStartDatePicker.SelectedDate,LeaveEndDatePicker.SelectedDate, Days) + 1),
It then goes on to set variables for full weeks and days etc.
The link that I mentioned in my first post suggests full day/am/pm checkboxes and the attached formula (Leave2) but I cannot get it to work at all.
I've also tried the formula in Leave3 attachment which was another post I read but no joy!
Does that explain it?
Hi @spow :
Do you want to add an "half day" option base on the leave request template?
If so,please try this solution:
1\Add two Radio controls(Radio1ForLeaveStartDatePicker/Radio2ForLeaveEndDatePicker) into NewRequestScreen screen:
2\Set LeaveStartDatePicker's OnSelelct property to
How to exclude sunday alone from above code. In this code it excluded weekend days(Saturday and Sunday) but I want to set Saturday as a business day.
Apologies for late response as I have only just had a chance to try this and I really appreciate your time in responding,
I went through your guidance above but it's still not working, it's does not seem to be registering the AM and PM and is still taking the dates selected as whole days - see attachment HalfDay1. And consequently this is not pulling through correctly on the request details - see attachment HalfDay2.
Am I missing something?
Just to confirm both the On Change for both radio controls is set to LeaveStartDatePicker?
Very frustrated with this and if I can't get this to work, I will have to look at doing my own and waste weeks of work. Defeats the object of having a "quick" template!
Thank you in anticipation.
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Did you miss the call? Check out the recording here!