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 / Dropdown color change
Power Apps
Answered

Dropdown color change

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I want to change the color of the item when it is selected on the dropdown. 

 

If it can be done with simple drop down, please suggest. If it has to be done by gallery please suggest all the steps in details.

 

Attachment is to provide exact scenario. 'Ontrack': Green . 'Off-Track' has to be made Red in color.

 

Regards,

Nandan

 

@WarrenBelz @GarethPrisk 

Dropdown2.png
Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    Use this code in the Fill property of your dropdown

     

    Switch(
     Dropdown1.Selected.Value,
     "On-Track", Green,
     "Off-Track", Red
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank You @PowerExplorer But the provided code wont work. 😞 

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    Please give a little more detail: what do you mean by "it won't work?"  Did you receive any error message?

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaneyThank you for your response.  I apologize, I would have provided the error message. Screenshot attached. 

    Dropdown2.png
    Dropdown2.png
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    Your column must be named something different than "Value".  Type this code section of code and see what comes up in the AutoComplete.  Then choose the appropriate column

     

    Dropdown1.Selected.


    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you @mdevaney … There is no error message. But it wont work for the Red. Seems it is not getting through to the next line: "Off-Track, Red . I have altered the color to check, the first line : "On-Track", Green, is working but not the second part. 😞

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    This section of code is missing a closing quote

     

    "Off-Track", Red

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Apology for my typo, I have provided proper opening and closing quotes. But the result is the same. Its working for the first part while for the second part it is not.

    Anyway, I am grateful for your support till now. 

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    Can you please share a screenshot of the code you wrote in the formula bar?  I am not seeing the reason for the error...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney  attached.

    Dropdown2.png

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard