Multi Row Variable Set is not displaying values after changed the internal name

Claudio6
Tera Expert

I changed the internal name of Multi Row Variable Set and I updated the name in the catalog client script where the MRVS is used. After submitted the form, the values of the MRVS in the request item are empty. I reverted the internal name of the MRVS and updated the catalog client script and the values are displaying fine in the request item. Anyone could explain why this is happening? Thank you!

2 ACCEPTED SOLUTIONS

Ravi Gaurav
Giga Sage
Giga Sage

 

To resolve the issue where the values of the Multi Row Variable Set (MRVS) are empty after changing its internal name, follow these steps:

1. Ensure All References are Updated:

  • Double-check that the new internal name is updated in every place where the MRVS is referenced, including:
    • Catalog Client Scripts
    • Catalog UI Policies
    • Scripted REST APIs or Business Rules that might interact with the MRVS
    • Any other scripts or workflows that use this MRVS

2. Clear Form and System Cache:

  • After making changes to the internal name and updating references, clear the form cache:
    • Go to System Definition > Scripts – Background
    • Run the following script:
      GlideForm.clearCache(); GlideSysAttachment.clearCache(); gs.print("Cache cleared");
  • Alternatively, navigate to the form and refresh it using the &sysparm_clear_stack=true URL parameter to clear the cache for that form.

3. Verify Schema and Data Model:

  • Ensure that the new internal name doesn't disrupt the way ServiceNow stores the MRVS data.
  • Check the associated tables (sc_item_option_mtom, sc_multi_row_variable_set_mtom, etc.) to ensure data is properly linked to the request item (RITM).

4. Test in a Sub-Environment:

  • Before applying changes to production, test the new internal name in a sub-production environment to ensure everything works correctly.

5. Fallback Plan:

  • If the above steps do not resolve the issue, consider reverting the internal name to the original name and then use an alternative approach to manage naming conventions, such as maintaining a consistent internal name while changing only the display name if necessary.

Example Script Adjustment:

If you initially changed the internal name in a Catalog Client Script, ensure the script correctly uses the new name:

 

function onLoad() { // Assuming the internal name of the MRVS is now 'new_mrvs_name' var mrvs = g_form.getControl('new_mrvs_name'); // Your logic here... }

 

If you reverted the name back and everything works fine, the issue was likely due to an incomplete update across the system. It’s crucial to update all references to avoid these kinds of issues.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

View solution in original post

Thank you so much for very detailed explanation! I'll take a look in each bullet to see what is failing. 

 

Best regards Ravi!

 

PS: Big fan of your youtube videos. Thank you for sharing!

View solution in original post

2 REPLIES 2

Ravi Gaurav
Giga Sage
Giga Sage

 

To resolve the issue where the values of the Multi Row Variable Set (MRVS) are empty after changing its internal name, follow these steps:

1. Ensure All References are Updated:

  • Double-check that the new internal name is updated in every place where the MRVS is referenced, including:
    • Catalog Client Scripts
    • Catalog UI Policies
    • Scripted REST APIs or Business Rules that might interact with the MRVS
    • Any other scripts or workflows that use this MRVS

2. Clear Form and System Cache:

  • After making changes to the internal name and updating references, clear the form cache:
    • Go to System Definition > Scripts – Background
    • Run the following script:
      GlideForm.clearCache(); GlideSysAttachment.clearCache(); gs.print("Cache cleared");
  • Alternatively, navigate to the form and refresh it using the &sysparm_clear_stack=true URL parameter to clear the cache for that form.

3. Verify Schema and Data Model:

  • Ensure that the new internal name doesn't disrupt the way ServiceNow stores the MRVS data.
  • Check the associated tables (sc_item_option_mtom, sc_multi_row_variable_set_mtom, etc.) to ensure data is properly linked to the request item (RITM).

4. Test in a Sub-Environment:

  • Before applying changes to production, test the new internal name in a sub-production environment to ensure everything works correctly.

5. Fallback Plan:

  • If the above steps do not resolve the issue, consider reverting the internal name to the original name and then use an alternative approach to manage naming conventions, such as maintaining a consistent internal name while changing only the display name if necessary.

Example Script Adjustment:

If you initially changed the internal name in a Catalog Client Script, ensure the script correctly uses the new name:

 

function onLoad() { // Assuming the internal name of the MRVS is now 'new_mrvs_name' var mrvs = g_form.getControl('new_mrvs_name'); // Your logic here... }

 

If you reverted the name back and everything works fine, the issue was likely due to an incomplete update across the system. It’s crucial to update all references to avoid these kinds of issues.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Thank you so much for very detailed explanation! I'll take a look in each bullet to see what is failing. 

 

Best regards Ravi!

 

PS: Big fan of your youtube videos. Thank you for sharing!