How to edit variables from variable editor

Santhosh23
Tera Expert

In service catalog all variables are read only in variable editor.. I need to edit one variable in task ..I created UI policy which apply on task and also tried creating client script but nothing works out.. can anyone explain what we can do for making one variable editable in task.

4 REPLIES 4

Brian Lancaster
Tera Sage

There could be a couple reasons for this.

  1. You have a business rule that make that variable editor read only.
  2. On the variable you have the write role set to admin (This appears on the permission tab)
    find_real_file.png

Pranesh072
Mega Sage
Mega Sage

You can check all these conditions. OOB variable editor is writable.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718582 

Rahul RJ
Giga Sage
Giga Sage

Hi Santhosh,

There might be onload client script which will run on RITM and SC_task 

function onLoad() { 
$("variable_map").querySelectorAll("item").forEach(function(item){
var variable = item.getAttribute("qname"); 
if(variable !='xyz'){ // to make perticular variable editable

g_form.setReadOnly("variables."+ variable, true); 

}); 
}

Or UI policy which will run on RITM and Task

g_form.setVariablesReadOnly(true); //this will make variable section readonly 

 

Thanks,

RJ

AlekhyaD2093158
Tera Contributor

Hi, did you find any solution for this?