Get selected text in dropdown component

Another method..

On the dropdown create a custom property called displayvalue.

On the dropdown value prop, right click and add a change script.

	data = self.props.options
	for row in range(data.getRowCount()):
		if (data.getValueAt(row, "value") == self.props.value):
			self.custom.displayvalue = data.getValueAt(row, "label")
			break

That should then update the custom property with the label.

Credit goes to the below, there was another script that took that code a step further that may help.

1 Like