How to make a field on Catalog task editable based on the variable value?

Saai1
Tera Expert

Hello,

 

I have a checkbox type field on the catalog task table and I want to make that editable only when the variable request type value is  xxx.

 

Any advice on how to do this?

 

Thanks,

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Please write a onload client script and all the below in the client script:-

 

 var value = g_form.getValue('varibalename')

       if (value=='whatevervalueyouwanttomatch'){

              g_form.setReadonly('fieldname',false);

       }

 

Please mark my answer as correct based on Impact.

View solution in original post

7 REPLIES 7

I have a field on catalog task table and I want to make it editable based on the variable value.

Community Alums
Not applicable

Hi @Saai1 write a On Change catalog client script as below

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

 var rtv = g_form.getValue('Request type');

if (rtv == 'xxxxx'){

g.form.setReadonly('fieldname',false);

}

}

 

Please mark answer as correct/like if it is in line with you expectation.

 

Regards,

Gagan k

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Please write a onload client script and all the below in the client script:-

 

 var value = g_form.getValue('varibalename')

       if (value=='whatevervalueyouwanttomatch'){

              g_form.setReadonly('fieldname',false);

       }

 

Please mark my answer as correct based on Impact.