# Getting the selected label of a dropdown

**URL:** <https://forum.inductiveautomation.com/t/getting-the-selected-label-of-a-dropdown/21956>\
**Category:** Ignition Early Access\
**Created:** [January 17, 2019, 9:49pm UTC](https://forum.inductiveautomation.com/t/getting-the-selected-label-of-a-dropdown/21956 "2019-01-17T21:49:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kfortin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kfortin/32/4195_2.png) [@kfortin](https://forum.inductiveautomation.com/u/kfortin)\
**Post date:** [January 18, 2019, 5:16pm UTC](https://forum.inductiveautomation.com/t/getting-the-selected-label-of-a-dropdown/21956/3 "2019-01-18T17:16:29Z")

</div>

To expand on Sam’s answer, especially if you don’t use integers as your option values:

Create a custom property on the dropdown component with the key ‘selectedLabel’.  
Create a Property binding for selectedLabel, linked to `this.props.value`.  
Add a Script transform with the following code:

```auto
x = None
for i in range(len(self.props.options)):
	if self.props.options[i].value == value:
		x = self.props.options[i].label
		break
return x

```

As Sam mentioned, you can then reference `self.getSibling('drReasonCode').custom.selectedLabel` in your event script.

---

_[View the full topic](https://forum.inductiveautomation.com/t/getting-the-selected-label-of-a-dropdown/21956)._
