How to make catalog variable editable on RITM.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 02:29 AM
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.
Any help is appreciated!
Regards,
Rafmine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 03:30 AM
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://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);
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 05:26 AM
Hi Paul,
in may case it should be editable only when the task is assigned to particular group only.
Appreciate any help.
Regards,
Rafmine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 04:20 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2022 05:23 AM
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.