<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Set value in a single line text variable in a multi row variable set based on producer variable in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511120#M1250956</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/173710"&gt;@Amrutha K V&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use an onLoad Catalog Client Script that applies to the MRVS instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within this script, you can reference variable values on the parent form using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;g_service_catalog.parent.getValue('var_name').&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Refer:&amp;nbsp;&lt;/STRONG&gt;&lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI#g_service_catalog-getValue_S?navFilter=g_service_catalog" rel="noopener noreferrer" target="_blank"&gt;https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI#g_ser...&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var display = g_service_catalog.parent.getValue('sales_org');
    g_form.setValue('sales_organization', display);
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Mar 2026 18:22:05 GMT</pubDate>
    <dc:creator>Tanushree Maiti</dc:creator>
    <dc:date>2026-03-19T18:22:05Z</dc:date>
    <item>
      <title>Set value in a single line text variable in a multi row variable set based on producer variable</title>
      <link>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511056#M1250949</link>
      <description>&lt;P&gt;How can we set value in a single line text variable which is present in the multi row variable set, based on one of the reference variable [which is present in the record producer].&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Name of the reference variable which is present in the record producer : Sales Org&amp;nbsp;&lt;BR /&gt;Name of the Single Line Text variable which is present in the multi row variable set : Sales Organization&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When user selects a value in the reference variable : 'Sales Org' from record producer and selects 'Add' on the multi row variable set -&amp;gt;New row opens&lt;BR /&gt;Which is having a single line text variable named 'Sales Organization '.&amp;nbsp;&lt;BR /&gt;I wants to autofill MRVS 'Sales Organization' field based on the selected value in Sales Org (outside MRVS).&lt;BR /&gt;Could you please help me here.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2026 16:01:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511056#M1250949</guid>
      <dc:creator>Amrutha K V</dc:creator>
      <dc:date>2026-03-19T16:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set value in a single line text variable in a multi row variable set based on producer variable</title>
      <link>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511058#M1250950</link>
      <description>&lt;P&gt;I tried with an OnLoad Client Script in the MRVS level . But this is not working. Please help.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; onLoad() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; display = parentForm.getDisplayValue(&lt;/SPAN&gt;&lt;SPAN&gt;'sales_org'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; g_form.setValue(&lt;/SPAN&gt;&lt;SPAN&gt;'sales_organization'&lt;/SPAN&gt;&lt;SPAN&gt;, display);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Mar 2026 16:05:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511058#M1250950</guid>
      <dc:creator>Amrutha K V</dc:creator>
      <dc:date>2026-03-19T16:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set value in a single line text variable in a multi row variable set based on producer variable</title>
      <link>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511120#M1250956</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/173710"&gt;@Amrutha K V&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use an onLoad Catalog Client Script that applies to the MRVS instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within this script, you can reference variable values on the parent form using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;g_service_catalog.parent.getValue('var_name').&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Refer:&amp;nbsp;&lt;/STRONG&gt;&lt;A href="https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI#g_service_catalog-getValue_S?navFilter=g_service_catalog" rel="noopener noreferrer" target="_blank"&gt;https://developer.servicenow.com/dev.do#!/reference/api/rome/client/g_service_catalogClientAPI#g_ser...&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var display = g_service_catalog.parent.getValue('sales_org');
    g_form.setValue('sales_organization', display);
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2026 18:22:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/set-value-in-a-single-line-text-variable-in-a-multi-row-variable/m-p/3511120#M1250956</guid>
      <dc:creator>Tanushree Maiti</dc:creator>
      <dc:date>2026-03-19T18:22:05Z</dc:date>
    </item>
  </channel>
</rss>

