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.

Shantharao
Kilo Sage

Hello All,

 

Here is the code to make mandatory variables in the catalog task form

g_form.setMandatory('variables.variablename',true); 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(g_form.getValue("short_description")=="Asset Coordinator will close after ITSHOP request has been created"){
if(newValue=='3'){
g_form.setMandatory('variables.itsps_code',true);
g_form.setMandatory('variables.itsps_no',true);
}
else{
g_form.setMandatory('variables.itsps_code',false);
g_form.setMandatory('variables.itsps_no',false);
}
}
}

 

please mark help if it is useful to you

Version history
Last update:
‎04-18-2019 02:34 AM
Updated by: