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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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