Update to Catalog Variable in RITM's variable editor is failing and getting reset to initial value

learn nv
Tera Contributor

Hi All,

I am trying to update the catalog variables on RITM, but it is always getting reset to the value of while raising the request. But, OOB it is working without any issues and getting updated to the new value.

 

Can someone suggest, how can I solve this?

I have enabled debugger and done the testing, none of BR or ACL failures shown in debug logs.

 

Thank you,

nvlear9

2 REPLIES 2

Yaramala
Mega Sage

Hello @learn nv 

 

Hi,

Since the same update works for an OOB catalog item, the issue is most likely with customization on this catalog item or its variable set rather than an ACL or standard Business Rule.

Please check the following:

  • Catalog Client Scripts on both the item and its variable sets, especially onLoad, onChange, or onSubmit scripts with Applies on Requested Items enabled

  • Catalog UI Policies that set or clear the variable value, including Reverse if false

  • Catalog Data Lookups, because they can run on Requested Items and overwrite the value again

  • Flow Designer flow or legacy workflow activities that may copy the original value back after the RITM is updated

  • Duplicate variable names on the item or variable sets

  • Any standard Client Script on sc_req_item referencing a field and variable with the same name. In that situation, reference the variable as variables.variable_name

Use Debug Service Catalog Variables / Debug Actions on Catalog Item Variables while updating the RITM. This should show exactly which Client Script, UI Policy, or Data Lookup changes the value.

Also check the related sc_item_option value immediately after saving. If the new value is saved and later changes back, a flow/workflow or server-side process is resetting it. If the new value is never saved, focus on the Variable Editor, Catalog Client Scripts, UI Policies, and Data Lookups.

Do not add Business Rules directly to sc_item_option, as it is an internal Service Catalog table.

 

Please mark this as Helpful if it helps.

If this addresses your question, please mark this response as Accepted Solution 

Yaramala_0-1781720479012.png

 

 

 

 

 or mark has helpful 

Yaramala_1-1781720478968.png

 

 

 

 

 if you find it helpful.

Thank you!

TejaswiniY

 

 

Tanushree Maiti
Tera Patron

Hi @learn nv 

 

1) refer KB: KB0748094 Variable value is cleared on RITM and SC Task variable editor after the item is submitted 

Resolution

Uncheck the "Clear the variable value" checkbox

 

2)Catalog Client Scripts or UI Policies may be configured to run on the RITM form rather than just the initial Catalog Item. Ensure that the Applies on Requested Items checkbox is unchecked on the conflicting scripts and policies so they only execute during the initial request phase

 

3)Look at the RITM’s History > List to confirm if the variable changes are being audited and captured, which can help pinpoint exactly which user, UI policy, or business rule is making the subsequent update to reset the value.

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti