cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Leave Request - weekend calculation

Hi ,

 

 I want to calculate all the days that are being requested, including weekends. There is already a variable being defined, _inclusiveTotalDaysRequested .

I manged to add  one leave type which calculates total days requetsed, but when am adding multiple leaves its giving error .

 

please assist

 

 

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

Could you please share a bit more about the error message within your app?
Could you please show more details about your scenario?

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Kris,

 

Am trying to set few leave types which calculates only date difference , Lets say for example maternity and paternity , As per company policy  eligible leaves are in calender days not working days .

 

I managed to setup Maternity by modifying the formulas in below areas,But when i add multiple leave types in with same formula am getting error.

 

 

 NewRequestScreen -> GroupDateSelection -> OnSelect

               If(Upper(_selectedLeaveType.type)<>"Maternity", Set(_requestedDays, _workDaysInRequest - _holidaysInRequest), Set(_requestedDays, _inclusiveTotalDaysRequested))

Then  it is effectively checking if Maternity was selected, then we set _requestedDays to _inclusiveTotalDaysRequested.

 

HomeScreen -> GalleryRequests -> OnSelect

If(Upper(_selectedLeaveType.type)<>"Maternity", Set(_requestedDays, _workDaysInRequest - _holidaysInRequest), Set(_requestedDays, _inclusiveTotalDaysRequested))

 

Text property in NewRequstScreen -> GourpDateSelectio -> Label1_9

LookUp(RequesterBalanceCollection, Upper(type)=Upper(_selectedLeaveType.type), balance) - If(Upper(_selectedLeaveType.type)<>"Maternity", _requestedDays, _inclusiveTotalDaysRequested)

    &

    " days"

 

Regards,

Rahul Lal

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,594)