Variables readonly in sctask once form is Saved

wefw
Tera Contributor

Hi,

We have few decision making variables in sctask with type yes/no. can we make them readonly once that variables are filled and sctask is saved?

 

Thanks

1 ACCEPTED SOLUTION

@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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

@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  ||  9x 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