Label instead of Data

The line of code below looks at the data list of a listbox.
How can I have the getValue command look at the label list of a listbox

What the code does
if (combobox.getValue() == “data”)

What I would like it to do
if (combobox.getValue() == “label”)

Set your data to the same as your labels.

Nice try but this will not work for me because I am trying not to use the data list at all.:cowboy:

Any particular reason for that?
It’s how this component works, it’s s’posed to make your life easier by just filling in the labels and data, not making it harder… :wink:

onChange = function ()
{ if (combobox.getValue() == “label”)
{screen.loadSound(getValue() == “data”, true);}

Ok I know this is not correct code, but it is the idea I am showing.

label= what you see in the listbox.
Data= the url of the mp3.

Wrong syntax: it’s

Makes sense, thank you.:slight_smile: