How to auto populate a record producer field based on reference field selection.

jmcm
Tera Contributor

Hi,

I want to auto populate the field DESC with the description of the incident selected in field INC.

Once the incident has been selected, the description of the incident should auto fill.

How can this be achieved with a catalog client script to do a glide ajax to a script include?

All help is appreciated, thanks in advance!

find_real_file.png

11 REPLIES 11

Ujjawal Vishnoi
Mega Sage

You can use the with callback as below in onchange client script on inc field change

var volume = g_form.getReference("inc", setCurrentValues);    //Replace inc with INC variable name

function setCurrentValues(inc) {
g_form.setValue("desc", inc.short_description);  //Replace desc with DESC variable name

}

Below is the screenshot of the screen.

find_real_file.png

 

Hope this helps

@jmcm  

Please mark my response correct and helpful. If i am able to help you with your query and this can be removed from unresolved list.

@jmcm 

Please mark my response correct and helpful. If I am able to help you with your query and this can be removed from unresolved list.

@jmcm 

Please mark my response correct and helpful. If I am able to help you with your query and it can be moved to answered list and helpful for future readers.