cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Gallery Template Fill based on date lookup part 2

I have a calendar gallery and a gallery of events.    There are date values to compare in both the calendar gallery and the event gallery.  StartDate and EndDate are not text values, they are date values, so there is no need to wrap them in DateValue().

 

This works beautifully. 

 

 

 

If(
     LookUp(GalleryHolidaysOtherEvents.AllItems, StartDate = DateValue(LabelAprilDateOE.Text), true), 
     Style.DayBG, 
     White
    )

 

 

 

Some events are multi-day.   I have both a Start Date and an End date.  However neither of these work.   There are no errors and single day events where the day that matches the start date is filled appropriately, but the end date and the days in between are not filled and multi-day events do not have any days filled..

 

 

 

If(
     LookUp(GalleryHolidaysOtherEvents.AllItems, (StartDate >= DateValue(LabelAprilDateOE.Text) && EndDate <= DateValue(LabelAprilDateOE.Text)), true), 
     Style.DayBG, 
     White
    )

 

 

 

 

 

If(
     LookUp(GalleryHolidaysOtherEvents.AllItems, StartDate >= DateValue(LabelAprilDateOE.Text) && EndDate <= DateValue(LabelAprilDateOE.Text), true), 
     Style.DayBG, 
     White
    )

 

 

 

Any ideas?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @JR-BejeweledOne :

Please try:

 

 

If(
LookUp(GalleryHolidaysOtherEvents.AllItems, (StartDate <= DateValue(LabelAprilDateOE.Text) && EndDate >= DateValue(LabelAprilDateOE.Text)), true),
Style.DayBG,
White
)

 

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @JR-BejeweledOne :

Please try:

 

 

If(
LookUp(GalleryHolidaysOtherEvents.AllItems, (StartDate <= DateValue(LabelAprilDateOE.Text) && EndDate >= DateValue(LabelAprilDateOE.Text)), true),
Style.DayBG,
White
)

 

Best Regards,

Bof

I FINALLY figured that out yesterday.   Just hadn't had time to come back and update this.

 

Thanks!



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,223)