# Conditionally color dropdown background color based on a boolean value

**URL:** <https://forum.inductiveautomation.com/t/conditionally-color-dropdown-background-color-based-on-a-boolean-value/24149>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 15, 2019, 1:31pm UTC](https://forum.inductiveautomation.com/t/conditionally-color-dropdown-background-color-based-on-a-boolean-value/24149 "2019-04-15T13:31:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [April 15, 2019, 1:31pm UTC](https://forum.inductiveautomation.com/t/conditionally-color-dropdown-background-color-based-on-a-boolean-value/24149/1 "2019-04-15T13:31:06Z")

</div>

I have a dropdown menu where the user can potentially select multiple items. To make it obvious to the user what they have already selected, I am having the dropdown data point to a dataset that has the value, label, and a `selected` column. When a item is selected, the `selected` column will turn to True. I want drop down items that have a True in this third column to be a different color.

How can I accomplish this? I have a Styles dataset where I have two columns, `selected` and `background` with two rows one where selected is true and another where it is false with two different colors. However when testing everything is the same default gray. The 'Background Color` property is bold as though it is bounded after I added the Styles dataset, however clicking on the binding button doesn’t show me anything and it still doesn’t work. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 15, 2019, 1:38pm UTC](https://forum.inductiveautomation.com/t/conditionally-color-dropdown-background-color-based-on-a-boolean-value/24149/2 "2019-04-15T13:38:58Z")

</div>

Here is how I did something similar based on the string value of a dropdown menu using an expression binding

```auto
switch({Root Container.DayColor.selectedStringValue}, 'BLUE', 'ORANGE', 'GREEN', 'YELLOW', 'PURPLE', 'PINK',
	   color(0,0,255), color(255,140,0), color(0,255,0), color(255,255,0), color(255,0,255), color(255,134,218), color(0,0,0))

```
