how to show a field message when particular value selected on variable of catalog ?

1_DipikaD
Kilo Sage

Hi , 

I have below catalog with mentioned select box type variable . I want to show a field message when " add" is selected on that variable . I have tired the below Onchange catalog client script but couldn't get the result .

Please suggest what changes should I make to achieve this ?

 

Thank You

 

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
   if (newValue === '1') {
    g_form.showFieldMsg('request_type',"This request requires email approval from the Business mgmt", 'info');
   }
else{g_form.hideFieldMsg('request_type','true');
}


   //Type appropriate comment here, and begin script below
   
}

1_DipikaD_0-1756189366491.png