How do you reference the export value of a combo box item?
If the event.value of a combo box is the item name of the current selection, then what do you use to reference the current selection's export value?
If the event.value of a combo box is the item name of the current selection, then what do you use to reference the current selection's export value?
Good question. There's no simple way. The most direct way would be to use the currentValueIndices property and the getItemAt method to get it, but that doesn't update until after the validation event, so if you try it you'll get the value from before the change.
The only approach that I found to work is to basically iterate over all the items in the field (using numItems and getItemAt), comparing them to event.value, and if you find a match then use getItemAt again to get the export value of that index.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.