# Dropdown value giving value of 'script'

**URL:** <https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727>\
**Category:** Ignition\
**Created:** [March 28, 2022, 5:24pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727 "2022-03-28T17:24:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfeiten](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@gfeiten](https://forum.inductiveautomation.com/u/gfeiten)\
**Post date:** [March 28, 2022, 5:24pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727/1 "2022-03-28T17:24:30Z")

</div>

I’m trying to extract the value of a dropdown from a script and am getting weird results.

If I create a label and bind the text to the dropdown value using a transform/script  
selection = self.getSibling(“Dropdown”).props.value  
return selection

the result is ‘script’

if I add an ‘onActionPerformed’ event to the dropdown itself and write the value to a tag  
system.tag.write("[default]Test Tags/test\_dropdown\_selection", self)

the following is written:  
com.inductiveautomation.perspective.gateway.script.ComponentModelScriptWrapper$SafetyWrapper@414a6858

What am I doing wrong here???

---

<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:** [March 28, 2022, 5:26pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727/2 "2022-03-28T17:26:51Z")

</div>

Please use triple back ticks to format code

```

```auto
sampleCode

```

```

Or use the format button here -  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/91596f83fc014d7b85d623715b8ed9da0d175f4d.png)

`sampleCode`

to format your code. It will make the code you post easier to read and therefore more people are likely to respond.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 28, 2022, 5:35pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727/3 "2022-03-28T17:35:03Z")

</div>

> [@gfeiten](#):
>
> system.tag.write("[default]Test Tags/test\_dropdown\_selection", self)

`self` is a reference _to the entire dropdown component_. If you want to write its selection to a tag, you must pass that specific property.

---

<div class="post-metadata">

**Author:** ![gfeiten](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@gfeiten](https://forum.inductiveautomation.com/u/gfeiten)\
**Post date:** [March 28, 2022, 7:40pm UTC](https://forum.inductiveautomation.com/t/dropdown-value-giving-value-of-script/57727/4 "2022-03-28T19:40:52Z")

</div>

thanks, changing to self.props.value fixed it.
