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 Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (4,004)