
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
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