logo

NJP

Update Parent Record Variables from MRVS Selections

New article articles in ServiceNow Community · Dec 17, 2025 · article

Introduction

When building catalog items with Multi-Row Variable Sets (MRVS) in ServiceNow, you often need to propagate a selection/change inside a MRVS row to variables/fields on the parent Record. MRVS variable scripts run inside an iframe; to read or write the parent record's variables or fields you must use parent.g_form

``

``

Example — How It Works

  • Concept: Read the current MRVS row values with local g_form.getValue('variable_name'), and set parent RITM variables with parent.g_form.setValue('variable_name').

  • Minimal OnChange Catalog Client Script example on MRVS:function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue === '') return; // read row-level values (local g_form) var Account= g_form.getValue('company'); // set parent RITM variables so the values are available on the Parent form / RITM record parent.g_form.setValue('selected_company', Account); }​

Summary

  • Use parent.g_form inside MRVS client scripts to read/write RITM variables and keep MRVS state synchronized with the parent record.

  • Workflow-friendly pattern: read row values (local g_form), modify MRVS JSON on the parent, then update parent variables via parent.g_form.setValue(...).

  • Keep parsing safe, avoid heavy logic on the client, and use server-side validation for authoritative checks.

``

View original source

https://www.servicenow.com/community/itsm-articles/servicenow-tips-update-parent-record-variables-from-mrvs/ta-p/3451304