How to make catalog variable editable on RITM.?

Community Alums
Not applicable

Hi Community,

There are three catalog task which gets created one by one, like when first task is closed second task will get created and when second task is closed third task will get created. The requirement is for first task on RITM, catalog variables one variable should be read/write/editable only.

find_real_file.png

 

Any help is appreciated!

 

Regards,

Rafmine

 

 

14 REPLIES 14

Paul Curwen
Giga Sage

You can simply add the Variable Editor to the RITM form.

Open any RITM record and right-click on header and configure=>form layout and bring in variable editor from available items and save.

See:

https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/product/service-catalog-managemen...l

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

 

You can make certain variables read-only using an OnLoad Client Script and using for example: 

 

g_form.setVariablesReadOnly(true); //make all variables read-only

g_form.setReadOnly('variable_name_here', true); //but allow edit of this one

 

Preferably use a Catalog UI Policy (no coding required :)) with 'Applies on Requested Items' set to True 

 

g_form.setReadOnly('variable_name_here', false);

 

find_real_file.png

 

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

Community Alums
Not applicable

Hi Paul,

in may case it should be editable only when the task is assigned to particular group only. 

Appreciate any help.

 

Regards,

Rafmine.

OlaN
Giga Sage
Giga Sage

Hi,

Is there something that defines when the variables should be read only?
For example what assignment group the task is set to?
In that case you could create a Catalog UI policy, and script it so that it sets the variables to readonly based on the value of that field. But it's not a good solution, because the variables will be editable if one would manually change the group in that case.

 

Community Alums
Not applicable

Hi OlaN,

Yes, when the assignment group is 'market User' it should be only editable. can you help me with the solution and script.

thanks in advance.

Regards,

Rafmine.