Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

on change client script using a synch call

AnjaliY27945328
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 @AnjaliY27945328 ,

 

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.