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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Highlight Gallery row ...
Power Apps
Unanswered

Highlight Gallery row with specific color based on Condition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallery, i want to highlight a row based on a condition.

According to this site, I should use the TemplateFill field.

i am doing that, but not getting the condition to catch.

 

There is Queue Status, and then another field called cases, that is determiend by adding fields from a SPO List.

 

So the queu status looks like

ThisItem.EngineerQueueStatus.Value

 

And the cases:

ThisItem.'Crits Assigned' + ThisItem.'Non-Crits Assigned' + ThisItem.'POCs Assigned' + ThisItem.'SIEs Assigned'

 

I need to combine these two.  So an If one is available and the other is zero, highlight the row.

here is what I am trying to use, but keep either getting an error or nothing happens.

 

Gallery TemplateFill

 

f(ThisItem.EngineerQueueStatus.Value = "Available" & (ThisItem.'Crits Assigned' + ThisItem.'Non-Crits Assigned' + ThisItem.'POCs Assigned' + ThisItem.'SIEs Assigned' = 0),Color.Yellow,Color.Transparent)

 

 

Categories:
I have the same question (0)
  • JayMagness Profile Picture
    1,663 on at

    HI,

     

    Not sure if you did not copy it but an "I" is needed to start.

    Also, you are missing either the true or the fault action. there is only the If test, and only the true action or the false action not shure what one. there should be two "," in the if statement. One after the test, and one after the action to take if true, then the action if false at the end with a )

     

     

  • lardo5150 Profile Picture
    Microsoft Employee on at

    I have that, I have the IF, then if true, it is yellow, if not transparent.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Another thing to mention, even when I get the formula where there is no errors, nothing changes.

    For example:

    If(ThisItem.EngineerQueueStatus.Value = "Available",Color.Yellow,Color.Black)

    The value is Available, but nothing changes.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Here is my Gallery.

    lardo5150_0-1690143235129.png

    What I want is to highlight each row that the person is Available and Cases is 0.

    The field that has Available in it is the text input

    lardo5150_1-1690143335379.png

    Cases is a sum of different fields in SPO

    lardo5150_2-1690143379271.png

     

    My ultimate goal is to do an If.

    If queue status is Available AND cases is zero, then highlight the row.

     

    I am having issues combining the two conditions, but the first issue I am running into is just highlighting the row.

    I broke it down to just one condition, and can't get it to highlight.

    My latest attemp is a simplified version.

     

     

    If(
     QueueStatus.Text = "Available",
     Color.Yellow,
     Color.Black)

     

    Obviouisly there are matches, but the row never highlights.

     

    Same here, I know this matches, but no colo changes:

    If(
     ThisItem.EngineerQueueStatus.Value = "Available",
     Color.Yellow,
     Color.Black)

     

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Ok, I found out why it is not working.

    The previous author put in a background that alternates rows of white and White smoke, to make it easier to read.

    Example( you can see the alternating)

     

    lardo5150_3-1690144809904.png

     

    The FILL on that backround is this:

     

    If(Mod(Value(ThisItem.RowNumber),2)=0, Color!WhiteSmoke, Color!White)

     

    How could I modify this so that it is an and, maybe an or?

    Would like to add that if it is Available and zero cases, it is yellow.

     

    If I try to add another If statement, I get an error at the end of the first line:

    lardo5150_4-1690145044085.png

     

    f(Mod(Value(ThisItem.RowNumber),2)=0, Color!WhiteSmoke, Color!White);
    If(ThisItem.EngineerQueueStatus.Value="Available"
     && Sum(ThisItem.'Crits Assigned',ThisItem.'Non-Crits Assigned',ThisItem.'POCs Assigned',ThisItem.'SIEs Assigned') = 0,Color.Yellow)

     

  • lardo5150 Profile Picture
    Microsoft Employee on at

    this might be my solution.

    It is still alternating rows, and marking the correct ones with the color I want.

    Will check again tomorrow:

     

    f(ThisItem.EngineerQueueStatus.Value="Out of Queue"
     && Sum(ThisItem.'Crits Assigned',ThisItem.'Non-Crits Assigned',ThisItem.'POCs Assigned',ThisItem.'SIEs Assigned') = 0,ColorFade(Color.Red,0.5),
    If(Mod(Value(ThisItem.RowNumber),2)=0,Color!WhiteSmoke,
    If(Mod(Value(ThisItem.RowNumber),1)=0,Color!White)))

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard