Extract Color from Select Field

Is it possible to extract the color name or hex code of an option in a select field?
image

I have this select field and I want to create a filter view that we won’t need to continuously update as we are constantly adding new categories. Everything for Marketing will be color coded ‘hot pink’ no matter what. I want the filter to basically be ‘if the select field is this color, then show record in this view’.

My thought was that I could use a formula field to extract the color, and base the filter off of that formula field. So if the select field is ‘hot pink’ the formula field would say ‘hot pink’ and the view would be ‘if formula field is hot pink then show record in this view’.

Update: I figured this out (sort of). I created a field called ‘Category Color’. I then set up an automation to monitory the ‘Category Select Field’. Any time it changes, it will go in and update the ‘Category Color’ with the name of the color from the select field.
image
image

Still curious to see if there’s a better way with a formula.

@Cady_Smith1

That’s a pretty clever solution that you came up with there!

Will your categories always have the name of the department in them? And/or will the department name always be to the left of the category with those 2 pipes separating the department from the category?

If yes to either of these, you could create a formula field that either (1) searches for the department name or (2) extracts the department name, and then you could just filter on the formula field.

But your solution seems pretty great too… I would probably just stick with your solution.

That was my first thought, but the problem is the naming conventions aren’t consistent–just the color coding. This seems to be working really well so far! I just told it to filter and only show records where ‘Category Color’ is ‘pinkBright’ and as we’ve added more pink marketing categories it’s functioning the way I intended. :slight_smile:

1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.