Not applicable

hi, you can put a validation before making it as read only. just validate if it's empty or not. if it's not empty then make it read only

@wefw 

then check if variable is empty or not

Something like this

AnkurBawiskar_0-1738060748008.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

@wefw 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Abhishek_Thakur
Mega Sage

Hello @wefw ,

You need to configure the onSubmit client script which also applies to the catalog task and use the below line of code in your client script, that will work as you want.

g_form.setVariablesReadOnly(true);

 

Please mark my answer as accepted and give thumbs up, if it helps you.

Regards,

Abhishek Thakur

this will apply to every variable right, even there is no value in that variable