Making the variables in variable editor editable

Naresh291
Tera Contributor

Hi ,

 

I have a catalog item , where there are several fields which is to be filled by the user .  There are several catalog task created for this item . My requirement is to have the variables editable only in first catalog task ,and not in any other catalog tasks

Is it possible and please suggest .

 

Regards,

Naresh

7 REPLIES 7

While dot-walking within client scripts does not work in some cases, this is a working example that I am currently using.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Naresh,

you can write onload catalog client script with Applies to catalog task view

in that determine whether it is 1st or 2nd task based on Assignment Group of task or short description and make them read-only

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Naresh,

Create a display business rule and include the logic to store the value as true in a scratchpad if this is a first catalog task. Now create a OnLoad Client Script to hide the variables only if the scratchpad value is set to true.

https://docs.servicenow.com/bundle/orlando-application-development/page/script/business-rules/concep...

- Pradeep Sharma