Hi @cmcnally ,
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.
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