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.

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.

Users online (4,003)