Select box text variable

Can you access the text variable of a dropdown box?

I am able to access the value in the variables, but I do not see a way to access the text variable.

Hi @kevinwasie ,
you mean accessing the value you are using to display the dropdown? (What we call Displayed field)?

For now there is not a way to access it directly, but you can find it from your initial array.

Lets say you bind your dropdown to Products array, and use id field as value, and name field as displayed.
Your dropdown variable will be equal to the selected product id.
You can use this formula to retrieve the selected product:

lookup(dropdown-value, Products ,"id")

Then if you want the name

getKeyValue(lookup(dropdown-value, Products ,"id"), "name")

Hope this help :slight_smile:

Thank you. For this use case the drop down options are being supplied from options that users created, so we don’t know what they are going to be.

We then need to run logic based on if the display field contains a certain word.

I see the long way to do this of getting the value of the selected item, then testing against the array/collection if the display field has the word contained. It would just be simpler if we had direct access to the display field in no code.