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 / Colour in dropdown menu
Power Apps
Answered

Colour in dropdown menu

(0) ShareShare
ReportReport
Posted on by 29

I have a SharePoint list with custom form and within a dropdown, the field colour is determined by the selection. This is my formula - If(DataCardValue2.Selected.Value = "Request Complete", Color.LightGreen, DataCardValue2.Selected.Value = "In Progress", Color.Lavender, DataCardValue2.Selected.Value = "In Query", Color.LightCoral, DataCardValue2.Selected.Value = "HR/Payroll to Test", Color.Gold, DataCardValue2.Selected.Value = "Testing Issues", Color.Pink, DataCardValue2.Selected.Value = "Testing Complete", Color.MediumPurple, DataCardValue2.Selected.Value = "Cancelled", Color.Red, DataCardValue2.Selected.Value = "SAP Team to Action", Color.Plum, DataCardValue2.Selected.Value = "MSS Access Required (SAP Team use only)", Color.YellowGreen) 

 

This works well, except for on the initial creation of a new item. The user will click on the 'Request Status' dropdown and the options in blue text can be chosen, but they are difficult to read against the form background (see images 1 and 2 on attachment). However, when a status is already selected then the user changes to a different status, the options are easier to read (see images 3 and 4). Can someone help with this, is there a solution? Ideally I'd have a default value already populated on creating a new item, but this didn't seem to work.

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

    Hi @Caz6166,

     

    Try this.

    I would use a switch function as this is easier to read.

     

    Switch(DataCardValue2.Selected.Value,
     "Request Complete", Color.LightGreen, 
     "In Progress", Color.Lavender, 
     "In Query", Color.LightCoral, 
     "HR/Payroll to Test", Color.Gold, 
     "Testing Issues", Color.Pink, 
     "Testing Complete", Color.MediumPurple, 
     "Cancelled", Color.Red, 
     "SAP Team to Action", Color.Plum, 
     "MSS Access Required (SAP Team use only)", Color.YellowGreen,
     "", Color.YourChoice // For when there is no selection made
    ) 

     

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

     

  • Verified answer
    M_Ali_SZ365 Profile Picture
    1,110 on at

    Hi @Caz6166 ,

    Try This Code

    If(
     IsBlank(DataCardValue2.Selected.Value),
     Color.LightGray, // Set a default color for the initial creation
     Switch(
     DataCardValue2.Selected.Value,
     "Request Complete", Color.LightGreen,
     "In Progress", Color.Lavender,
     "In Query", Color.LightCoral,
     "HR/Payroll to Test", Color.Gold,
     "Testing Issues", Color.Pink,
     "Testing Complete", Color.MediumPurple,
     "Cancelled", Color.Red,
     "SAP Team to Action", Color.Plum,
     "MSS Access Required (SAP Team use only)", Color.YellowGreen
     )
    )

    Fuel our success! 🚀 Give a thumbs up and click 'Solution Accepted' to supercharge our community. Your actions speak volumes!
    Warm regards,
    Muhammad Ali

  • Caz6166 Profile Picture
    29 on at

    Thank you for this - this is exactly what I needed 😀

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 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard