Skip to main content
Participant
August 7, 2020
Question

Select Item from Dropdown list but export a different value

  • August 7, 2020
  • 1 reply
  • 477 views

I'm using a Dropdown List box. I have already added the "Items" to be displayed. However, when I select an item, I would like for a different value to be exported in to the same box. For example: Let's say my list contains the list of the 50 states, each state spelled out. When I select "Texas", I would like for the value exported to be "TX".

 

Snooping around I found this code, but nothing happens

event.value = event.target.getItemAt(event.target.currentValueIndices, true);

I'm inserting it in the Validate tab - Run Custom Validation Script. I've also tried it on the Calculate tab - Custom Calculation Script:

 

Is there something I'm missing here?

Any help would be much appreciated. Thanks

This topic has been closed for replies.

1 reply

ls_rbls
Community Expert
Community Expert
August 7, 2020

Place the code as custom format script.

 

See slide: