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 / Get the SharePoint lis...
Power Apps
Answered

Get the SharePoint list choice colour in a PowerApps gallery

(0) ShareShare
ReportReport
Posted on by 18

Hi, 

 

I have a PowerApps gallery that is getting rows from a SharePoint list. I want to be able to filter and easily display the rows based on a choices column in SharePoint. Is there a way to get the colour of the choices field from the SharePoint list in PowerApps?

cmcnally_0-1700751943895.png

 

I'd like to be able to use the same get the colours of theses choices for their labels in the power app gallery

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @cmcnally ,

     

    It is not possible to dynamically reference these, but you can re-create it by using a Switch() function in the Fill and Color properties of the label in the gallery.

     

    It could look something like this, although you can also use RGBA:

    Switch(
     Self.Text,
     "Draft", Color.Orange,
     "1.new request", Color.Red,
     etc. etc.
    )

     

     

  • Verified answer
    Hassan_SZ_365 Profile Picture
    542 on at

    Hi @cmcnally ,

    1. Create a Lookup Table: In your app or within the SharePoint site, create a lookup table that maps each choice value to its corresponding color.

    2. Use the Lookup Table: In your gallery, use the lookup table to determine the color that should be displayed for each item based on its choice value.

    Here's an example of what the code in PowerApps might look like:

     

    // Assume you have a collection called ChoiceColorMapping with columns 'Choice' and 'Color'
    // For each item in the gallery, look up the color based on the choice value
    
    ThisItem.YourChoiceColumn.Value in ChoiceColorMapping.Choice ? LookUp(ChoiceColorMapping, Choice = ThisItem.YourChoiceColumn.Value).Color : DefaultColor

     

    You would use this formula in the Fill property of a control inside the gallery that you want to display the color (like a rectangle or icon).

    To create the ChoiceColorMapping collection, you could use the OnStart property of the app with a formula like:

     

    ClearCollect(ChoiceColorMapping, {Choice: "Draft", Color: RGBA(255, 0, 0, 1)}, {Choice: "New Request", Color: RGBA(0, 255, 0, 1)} /* Add all other mappings here */)

     

    Replace "Draft", "New Request", and the RGBA values with the actual choice values from your SharePoint list and their associated colors.

    Remember to replace YourChoiceColumn with the actual name of your Choice column from SharePoint.

    While this doesn't dynamically pull the color from SharePoint, it allows you to replicate the visual aspect within PowerApps. If the colors change frequently in SharePoint, you'll need to update the lookup table to match. If SharePoint ever exposes the color information through the connector, you could then directly bind to it without needing a manual mapping.

     

    Best Regards,

    Hassan Raza

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

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard