on change client script using a synch call

Anjali yadav1
Tera Contributor
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if(isLoading||newValue==''){
        return;
    }
 
var ci=g_form.getReference('u_configuration_item',getCIdetails);
function getCIdetails(ci) // ci is object

{
g_form.getValue('u_asset_tag',ci.Asset_Tag);
g_form.getValue('u_serial_number',ci.Serial_Number);
}
}
 
the script is not working on changing ci value 
no auto populate value of asset tag and serial number
pls check and tell me where I am wrong
5 REPLIES 5

Rupanjani
Giga Guru

Hi @Anjali yadav1 ,

 

Use setValue instead of getValue to set the values on the fields.

setValue - sets the value on the field.

getValue - retrieves the data from the fields.


Mark the response correct and helpful if the answer assisted your question.