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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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