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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,695)