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 / Leave request days and...
Power Apps
Answered

Leave request days and hours

(0) ShareShare
ReportReport
Posted on by 122

Hello everyone

I'm building a leave request app in which the user should be able to request full days, half of a day, or a number of hours (keep in mind that any work day has 8 hours). 

I'm having problems finding the best ways to achieve this, as the user should be able to see how many leave days and hours he have left.

 

My data table has a choice column for the type of leave: the user can choose between a number of full days (with a start and end date), a morning leave, an afternoon leave (both should equal to 4 hours), or a hourly leave (where the user should be able to choose a starting and ending hour in the same work day).

 

Any suggestion on the best way to achieve this? I also need to exclude weekends from the day count.

 

I appreciate any help.

 

Pedro Fernandes

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    First, this linked thread has some good info on determining the day of the week from a date.

     

    My second recommendation is to store/manipulate leaves based on the number of hours, and present the users with the choices of day, half day, or hourly. Your app can handle the logic in the background. In this way, you are always working with consistent units in the data.

     

    I wouldn't use a choice column to store the data. Use a single line of text, which happens to be a number, since this is far simpler to handle in PowerApps. Choice columns cause more users to write posts on here in frustration than almost anything else. Just store the number of hours, which keeps it easy.

     

    Hope that helps,

    Bryan

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard