populate a single line text with values in a Lookup Select Box Variable

rafaelalves4337
Tera Contributor

Hello folks,

 

I have to populate a single line text with values in a Lookup Select Box variable.

 

First Lookup variable is Select_location (It will show a list from 10 different locations (Question_choice)

Second Lookup variable is the name of the location, example USA, India, Japan..... (this is also a question_choice)

 

I need to populate the variable name Room_selected (Single Line Text) with the option selected in the second Lookup Variable.

 

I was thinking to create a Catalog Client Script, but don't know how to do it...Any help?

1 REPLY 1

Alp Utku
Mega Sage

You need to write onChange Catalog client script on "locqation" variable. Then write the below code to populate "Room_ selected" variable.

 

var lc = g_form.getValue('location') ; //receive location info from the first variable

g_form.setValue('room_selected', lc) ; // populate the second variable