- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 07:35 AM
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,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 07:41 AM
Hi @Saai1 ,
use catalog UI policy to handle this scenario.
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 07:44 AM
If I write a catalog UI policy, how to get the filed on catalog task ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:05 AM
So you have a variable that is on some catalog items and not on others that you want to use to drive the visibility of a field on the catalog task table? If so I think your only option is an ACL that uses a script. Something like:
//This will need to be update
answer = (function(){
if(current.variables.MYVAR && current.variables.MYVAR == "SOMEVALUE"){
return true
} else {
return false
}
)();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:07 AM
Hi @Saai1,
You can achieve this using catalog client script. However, if you are writing a Catalog client script or UI policy on task table, then it will be applicable globally. So, what is your exact scenario? Is the field Read-only at the moment and why is like that?
Regards,
Gagan k