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 colors once t...
Power Apps
Answered

Changing colors once ticket is approved, reject etc

(0) ShareShare
ReportReport
Posted on by 61

Hi Team,

 

I am building ticket app where approvers have to 'approve', 'reject', 'pending approval' etc. Once the approver selects approved I want to ticket to turn green in color, red for reject and so on.

 

shery328_1-1708478293303.png

 

Refer above pic for ticket summary page.

I want the whole card for approved to turn into green, pending approval into orange, reject into red and so on.

 

Thanks in advance.

 

Categories:
I have the same question (0)
  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @shery328 

     

    I would use the TemplateFill property of your gallery to do this.

    Switch(Text(ThisItem.'Your Column Name'),
     "Approve", Color.Green,
     "Pending Approval", Color.Orange,
     "Reject", Color.Red
    )

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • shery328 Profile Picture
    61 on at

    Thanks for the reply @AARON_C . However its giving an error. Check the pic below for the error message.

     

    shery328_1-1708479372982.png

     

    Just for your reference refer pic below for the status column and options for this.

     

    shery328_2-1708479425556.png

     

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @shery328 

     

    Is this what you are trying to achieve?

    AARON_C_0-1708480706502.png

    'Test Input Choice' is a choice field in my Dataverse table and I am displaying it in my gallery with just a label control.

    AARON_C_1-1708480744763.png

     

     

  • shery328 Profile Picture
    61 on at

    @AARON_C 

    No

    I want to achieve as per pic below

    shery328_0-1708481371810.png

     

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @shery328 

    Like this?

    AARON_C_0-1708482981171.png

    Switch(Text(ThisItem.'Test Input Choice'),
     "Approve", Color.LightGreen,
     "Pending Approval", Color.Orange,
     "Reject", Color.Red,
     "Conditional Approval", Color.Yellow
    )

     

    What type of column is your status column?

  • shery328 Profile Picture
    61 on at

    @AARON_C 

    My status column is a choice type column. 

  • shery328 Profile Picture
    61 on at

    @AARON_C 

     

    I have tried this code, however it is not working.

    Switch(Text(ThisItem.'Test Input Choice'),
     "Approve", Color.LightGreen,
     "Pending Approval", Color.Orange,
     "Reject", Color.Red,
     "Conditional Approval", Color.Yellow
    )

     

     

  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @shery328 

     

    What are you using as your data source?

     

    If you are using SharePoint:

    Switch(ThisItem.Status.Value,
     "Approved", Color.LightGreen,
     "Pending Approval", Color.Orange,
     "Rejected", Color.Red,
     "Conditional Approval", Color.Yellow
    )

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • shery328 Profile Picture
    61 on at

    @AARON_C 

    Yes my data source is share point. 

     

    however the above code is not working.

    Can I call you rather than messaging.

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @shery328 

     

    This should work.

    • I have checked that all the choices are the same with your drop down.
    • Your choice column is called Status.
    • You place this in the TemplateFill property of the gallery.
    Switch(ThisItem.Status.Value,
     "Approved", Color.LightGreen,
     "Pending Approval", Color.Orange,
     "Reject", Color.Red,
     "Conditional Approval", Color.Yellow
    )

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard