web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

TemplateFill

(0) ShareShare
ReportReport
Posted on by 708

Hello,

 

I am looking to add conditional formatting to my gallery.  I have the following formula on the TemplateFill of the gallery:

 

If(DateAdd(ThisItem.EV_Date, -1) = Today(), Red,
ThisItem.Students_Added_Check.Value = "Yes", Green)

 

Just now, if ThisItem.EV_Date minus 1 is equal to Todays date, then that record is highlighted Red.

 

However, If ThisItem.Students_Added_Check.Value equals Yes, then the record should highlight Green.

 

If none of the criteria is meet, then the record should not be highlighted.

 

It doesn't go green even though it is marked "Yes".

 

Any suggestions on how i can fix this please?

 

thanks

Categories:
I have the same question (0)
  • Verified answer
    neill_long Profile Picture
    708 on at

    I think i have figured this out, I have changed the formula to:

     

    If(
     DateAdd(
     ThisItem.EV_Date,
     -1
     ) = Today() && ThisItem.Students_Added_Check.Value = "No",
     Red,
     DateAdd(
     ThisItem.EV_Date,
     -1
     ) = Today() && ThisItem.Students_Added_Check.Value = "Yes",
     Green,
     DateAdd(
     ThisItem.EV_Date,
     -1
     ) < Today() && ThisItem.Students_Added_Check.Value = "No",
     White
    )

     

    Seems to be working fine

  • v-yujincui-msft Profile Picture
    on at

    Hi @neill_long ,

     

    Congratulations!!!

     

    Glad to see you figured it out.
    Maybe you could consider marking your answer as a 'Solution' to close the case.

     

    Best Regards,
    Charlie Choi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard