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

harishdasari
Tera Guru

Hi Naresh,

Create the catalog UI policy and just check the "Applies on catalog task" and make the required variable or field or read-only true.

so users will not have option to edit the variables/fields on the task

 

find_real_file.png

 

Thank you.

Thanks, this helped

the requirement for me was to make one variable read only in sp variable editor

Brad Bowman
Kilo Patron
Kilo Patron

An easy way to make all variables read-only is with the following onLoad catalog client script that Applies on Catalog Tasks

function onLoad() {
if(g_form.getValue('short_description') != 'Fulfillment'){ //short description of the task where variables SHOULD be editable
g_form.setVariablesReadOnly(true);
}
}

If this is something you want on various catalog items, you can move it to a client script (not catalog client script) on the sc_task table.  You'll need to add a line to specify the catalog item

function onLoad() {
if(g_form.getValue('request_item.cat_item') == 'b1b3a1abdbf807004a29df6b5e961964'){ //sys_id of the Catalog Item that you want this to apply to
if(g_form.getValue('short_description') != 'Fulfillment'){
g_form.setVariablesReadOnly(true);
}
}
}

 

Hi @Brad Bowman  , I think dotWalking on client side is not possible, so I think this section of code you are proposing is not working:

 

if(g_form.getValue('request_item.cat_item')