Skip to main content
Participant
May 25, 2023
Question

Dropdown List How can i take the item name and value export to two separate text fields

  • May 25, 2023
  • 1 reply
  • 511 views

I have a dropdown list with Names of people and their assigned ID (for example Jane James with export value 1-223444.

 

I made a text field and put a custom calculation script 
event.value=this.getField("MDNameDropdown").value which works fine 

 

Now how can i do the same but for the Item name in a separate text field, so when i make a selection from the dropdown list it will populate the 2 text fields.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 25, 2023

The easiest way to do that is to use event.value under the Validation event of the drop-down, as that would return the selected display value, not the export value. You just need to reverse the logic of your code. So something like this:

this.getField("Text2").value = event.value;