Set Variables readonly on RITM

Sandeep kumar J
Tera Contributor

Hi Community

I need help for the below requirement

I want to make the variables read-only on the RITM form. I wrote a UI policy on the RITM table please find it below

find_real_file.png

This is working, but I have some variables for which the "Name" starts with "Edit_" should be editble on the RITM.

I have tried the below code, but it is not working

g_form.setReadOnly('variables.nameLIKEEdit^active=true','false');

Can you please help me if there is a way to fix this

 

Thanks in advance

22 REPLIES 22

@Ankur Bawiskar 

 

Hi Ankur

This UI policy is directly on the "sc_req_item" to set the varaibles readonly

The problem here is we use to have a catalog client script which was working before the patch upgrade.

We have around 1200 variables in our instance for which the name starts with "Edit" we want those variables to be editable on the RITM

I have tried the below code o the UI policy, but it is not working

g_form.setReadOnly('variables.nameLIKEEdit^active=true','false');

this is not working

 

This is a global fix for which I am looking for

 

 

Hi,

so you want all variables to be read-only but not the variables whose name starts with Edit on RITM

Then do this

1) make all variables readonly on RITM using catalog client script

2) then using UI policy which applies on Requested Item and make those variables 10 or 15 as editable

Regards
Ankur

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

Hi @Ankur Bawiskar 

I am so sorry I dint get the point #2

Also there are almost 1200 total number of variables for different catalog items, they should be editable on the sc_req_item table

Hi,

is your requirement for all catalog item's RITM or for specific catalog item?

Regards
Ankur

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

Hi @Ankur Bawiskar 

 

This is for all the catalog items