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:

What am I doing wrong here???

Please use triple back ticks to format code




Or use the format button here -


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.