cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pword
Helper IV
Helper IV

Add a Halfday leave in a leave request

Hi all, Can you help me on how to put a checkbox for a half day leave. 

 

With(
    {
        // generate a one-column table of all dates between start date & end date
        varDateRange: ForAll(
            Sequence(ThisItem.'End Date' - ThisItem.StartDate + 1),
            ThisItem.StartDate + Value - 1
        )
    },
    If(
        And(
            IsBlank(ThisItem.StartDate),
            IsBlank(ThisItem.'End Date')
        ),
        // show nothing if any date pickers are blank
        0,
        // show only dates Monday to Saturday and exclude holidays
        CountIf(
            varDateRange,
            And(
                Weekday(Value) in [2, 3, 4, 5, 6, 7],
                Not(Value in colHolidays.HolidayDates)
            )
        )
    )
)

 

0 REPLIES 0

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,692)