Dropdown value giving value of 'script'

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???

Please use triple back ticks to format code

```

sampleCode

```

Or use the format button here -
image

sampleCode

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

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.

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