cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
neill_long
Resolver III
Resolver III

TemplateFill of Gallery

Hello,

 

I am trying to add an If statement on the templatefill of my gallery.  I have a field stored in a SP List which is a calculate field, and it displays a date: calculated to show the day before the date entered in another field.

 

I want to the line to highlight red if this calculated field date is equal to todays date.

 

On the label in the gallery, I have the following formula to format the date:

 

Text(DateValue(ThisItem.Student_Add_Date, "en"),"[$-en-GB]dd/mm/yyyy")

 

On the TemplateFill on the Gallery, I have:

 

If(Value(ThisItem.Student_Add_Date) = Today(), RGBA(255, 0, 0, 1), RGBA(0, 0, 0, 0))

 

Can anyone help?

1 ACCEPTED SOLUTION

Accepted Solutions
neill_long
Resolver III
Resolver III

I think i was overthinking this and have come up with a different solution:

 

If(DateAdd(ThisItem.EV_Date, -1) = Today(), RGBA(255, 0, 0, 1), RGBA(0, 0, 0, 0))

 

this seems to work fine

View solution in original post

1 REPLY 1
neill_long
Resolver III
Resolver III

I think i was overthinking this and have come up with a different solution:

 

If(DateAdd(ThisItem.EV_Date, -1) = Today(), RGBA(255, 0, 0, 1), RGBA(0, 0, 0, 0))

 

this seems to work fine

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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