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 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.

Top Solution Authors
Users online (4,492)