cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LauraG1
Frequent Visitor

LookUp Date Range Calendar

Hi All

 

I am using a calendar in powerapps and want to use the date selected to search for sick leave - the sick leave will have a start and end date and I want to have a lookup that searches for the instance on the date selected. I.E. if the start date is 2nd September and the end date is the 5th September, I want the details of the instance to show when the user clicks the 2nd, 3rd, 4th, and 5th September on the calendar.

 

Some of the sick leave will not have end dates and they are still active, I think this is causing an issue in my lookup which looks like this:

 

LookUp(
SickLeave_1,
Name = Gallery9.Selected.Name &&

(SickDate >= _dateSelected && EndDate <= _dateSelected ),
Comments
)

 

 

 

Any ideas as to how to do this?

1 REPLY 1
AaronKnox
Resolver IV
Resolver IV

Check if EndDate is blank and adjust formula accordingly:

If(IsBlank(EndDate),
LookUp(SickLeave_1,Name = Gallery9.Selected.Name &&(SickDate >= _dateSelected),Comments),
LookUp(SickLeave_1,Name = Gallery9.Selected.Name &&(SickDate >= _dateSelected && EndDate <=_dateSelected ),Comments)
)

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,715)