Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to make variables in task view editable?

lisaO
Giga Contributor

Hi, i created a few variables for my catalog item which is supposed to be visible only in fulfiller view under a task. A fulfiller assigned to the request can fill up the variables when the task is assigned to them. However, when I test it out, i can't seem to modify the fields as they are all greyed-out. May I know what am i missing? Pls refer to the screenshot. THank you in advance

1 ACCEPTED SOLUTION

Can you check if these variables are already read-only or set client side? For example, open the sc_task, look closely at the variables, are they going from short not read-only to read-only? Then something has been put in place to make these read-only, onLoad Client Script for example.

The write_roles field has nothing to do with security_admin. This is a field on the Variables form with which you can set (client side) permissions on the variables.

Is this only occurring for this sc_task or also others?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

6 REPLIES 6

Pooja Devkar
Mega Guru

Hello,

There will be a client script/UI policy which will make the Variables read only. Modify that such that It will not run for specific Catalog Item/Task.

Still try :

Yes, It is possible. You can write a client script like if user has role set field to writable else readable.

      var rqdrole = g_user.hasRole('RoleName');

       if (rqdrole){

              g_form.setReadonly('fieldname',false);

       }

Please mark correct & helpful; if it's useful to you.

Thanks & Regards,

Pooja Devkar

lisaO
Giga Contributor

Just an update on this question. As mentioned by Pooja and Mark above, indeed there is a global UI Policy which is making the variables read only at task level. I had to exclude this particular SR from using that global UI policy.

Thanks, guys!