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 / Changing Gallery Color...
Power Apps
Answered

Changing Gallery Color Based on Edit Form

(0) ShareShare
ReportReport
Posted on by 8

Hello All,

 

I have an app in which our employees enter inspection results.  I have a list that contains all of the locations that need to be inspected twice each year.   I have added this list to a vertical gallery.  Our employees go into the gallery, click on the location and then add in the information needed for the inspection in the edit form.  I am trying to change the color of the gallery item to yellow once an inspection has been submitted once via the edit form.  After it has been submitted twice I want the gallery item to change to green.  Is it possible to change the color of the gallery item based on how many times an edit form for that specific item has been submitted?

 

Thank you!  

  

Categories:
  • WarrenBelz Profile Picture
    156,926 Most Valuable Professional on at

    Hi @Pynchr ,

    What is the Items of the gallery and what is the field name that determines whether there is more than one record ?

  • Verified answer
    kelseytran Profile Picture
    292 on at

    Hi @Pynchr ,

     

    If you're using a SharePoint list for your data, the way I've done this in the past is by adding a column to my SharePoint list to track the number of times an inspection has been submitted for each location.

     

    Say you call this column SubmissionCount.  Then in the app, you can get the data from your list and display it in the gallery and use conditional formatting to change the color of each item based on the value of the "SubmissionCount" column.

     

    In the Fill property of the gallery item, you can do something like this:

    If(
     ThisItem.SubmissionCount = 1, // Change color to yellow if submitted once
     Color.Yellow,
     If(
     ThisItem.SubmissionCount >= 2, // Change color to green if submitted twice or more
     Color.Green,
     Color.Default // Default color for other cases
     )
    )

    You'll also need to make sure the "SubmissionCount" column in your list is updated each time an inspection is submitted (via Patch or Update function when form is submitted).

    ------------------------------------------------------------------------------------------------------------------------------
    If I answered your question, please accept my post as a solution and if you liked my response, please give it a thumbs up.

    Thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard