<?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 Need help on script to populate short description on RITM. in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315867#M3667</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to populate short description on RITM based on choices select through catalog. For example if I select Q1=a then Q2 selected choices on catalog need to populate on RITM short description or&amp;nbsp;if I select Q1=b then Q3 selected choices on catalog need to populate on submitted RITM short description.&lt;/P&gt;&lt;P&gt;Can anyone help me with script for that?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jul 2025 15:06:00 GMT</pubDate>
    <dc:creator>Nandini Gupta</dc:creator>
    <dc:date>2025-07-09T15:06:00Z</dc:date>
    <item>
      <title>Need help on script to populate short description on RITM.</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315867#M3667</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to populate short description on RITM based on choices select through catalog. For example if I select Q1=a then Q2 selected choices on catalog need to populate on RITM short description or&amp;nbsp;if I select Q1=b then Q3 selected choices on catalog need to populate on submitted RITM short description.&lt;/P&gt;&lt;P&gt;Can anyone help me with script for that?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 15:06:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315867#M3667</guid>
      <dc:creator>Nandini Gupta</dc:creator>
      <dc:date>2025-07-09T15:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on script to populate short description on RITM.</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315896#M3668</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi &lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/540653"&gt;@Nandini Gupta&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes, you can achieve this using either &lt;STRONG&gt;Flow Designer&lt;/STRONG&gt; or a &lt;STRONG&gt;Business Rule&lt;/STRONG&gt; to populate the &lt;STRONG&gt;Short Description&lt;/STRONG&gt; on the RITM based on the selected catalog variables.&lt;/P&gt;&lt;H3&gt;Option 1: Flow Designer&lt;/H3&gt;&lt;P&gt;Create a flow and attach it to your Catalog Item. Use the &lt;STRONG&gt;"Catalog Item Requested"&lt;/STRONG&gt; trigger. In the flow:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Add a action&amp;nbsp;&lt;STRONG&gt;"Get Catalog Variables"&lt;/STRONG&gt; step to access the values of Q1, Q2, and Q3.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Use a &lt;STRONG&gt;"update record"&lt;/STRONG&gt; action to update the RITM's &lt;STRONG&gt;Short Description&lt;/STRONG&gt; field based on the value of Q1.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Example logic:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If Q1 = a, populate from Q2&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If Q1 = b, populate from Q3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;Option 2: Business Rule&lt;/H3&gt;&lt;P&gt;You can also use a Business Rule on the sc_req_item table (RITM) like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;(&lt;SPAN class=""&gt;function&lt;/SPAN&gt; &lt;SPAN class=""&gt;executeRule&lt;/SPAN&gt;(&lt;SPAN class=""&gt;current, previous&lt;/SPAN&gt;) { &lt;SPAN class=""&gt;var&lt;/SPAN&gt; q1 = current.&lt;SPAN class=""&gt;variables&lt;/SPAN&gt;.&lt;SPAN class=""&gt;q1&lt;/SPAN&gt;; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (q1 == &lt;SPAN class=""&gt;'a'&lt;/SPAN&gt; &amp;amp;&amp;amp; current.&lt;SPAN class=""&gt;variables&lt;/SPAN&gt;.&lt;SPAN class=""&gt;q2&lt;/SPAN&gt;) { current.&lt;SPAN class=""&gt;short_description&lt;/SPAN&gt; = &lt;SPAN class=""&gt;'Q1: a | Q2 selection: '&lt;/SPAN&gt; + current.&lt;SPAN class=""&gt;variables&lt;/SPAN&gt;.&lt;SPAN class=""&gt;q2&lt;/SPAN&gt;.&lt;SPAN class=""&gt;getDisplayValue&lt;/SPAN&gt;(); } &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; (q1 == &lt;SPAN class=""&gt;'b'&lt;/SPAN&gt; &amp;amp;&amp;amp; current.&lt;SPAN class=""&gt;variables&lt;/SPAN&gt;.&lt;SPAN class=""&gt;q3&lt;/SPAN&gt;) { current.&lt;SPAN class=""&gt;short_description&lt;/SPAN&gt; = &lt;SPAN class=""&gt;'Q1: b | Q3 selection: '&lt;/SPAN&gt; + current.&lt;SPAN class=""&gt;variables&lt;/SPAN&gt;.&lt;SPAN class=""&gt;q3&lt;/SPAN&gt;.&lt;SPAN class=""&gt;getDisplayValue&lt;/SPAN&gt;(); } })(current, previous);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Use a &lt;STRONG&gt;Before Business Rule&lt;/STRONG&gt; (on insert/update) so the short description is set before saving.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Ensure variable names (q1, q2, q3) match your actual variable names in the catalog item.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saadat Ali&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 15:24:19 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315896#M3668</guid>
      <dc:creator>ali bhatti</dc:creator>
      <dc:date>2025-07-09T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on script to populate short description on RITM.</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315908#M3669</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/540653"&gt;@Nandini Gupta&lt;/a&gt;&amp;nbsp; - Can you try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function onChange(control, oldValue, newValue, isLoading) {
  if (isLoading || newValue == '') {
    return;
  }

  var q2 = g_form.getValue('Q2');
  var q3 = g_form.getValue('Q3');
  var shortDesc = '';

  if (newValue == 'a') {
    shortDesc = 'Request for Q2: ' + q2;
  } else if (newValue == 'b') {
    shortDesc = 'Request for Q3: ' + q3;
  }

  g_form.setValue('short_description', shortDesc);
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Jul 2025 15:33:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3315908#M3669</guid>
      <dc:creator>shubhamseth</dc:creator>
      <dc:date>2025-07-09T15:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on script to populate short description on RITM.</title>
      <link>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3316161#M3671</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/540653"&gt;@Nandini Gupta&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Please try setting the values with &lt;STRONG&gt;flow designer&lt;/STRONG&gt;. I am &lt;STRONG&gt;attaching the screenshot of flow&lt;/STRONG&gt; you can refer and create same as it is it would work.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Hope my answer helps your requirement. Also feel free to ask if there is any doubt in the &lt;STRONG&gt;flow created in the screenshot attached&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;If my response helped please &lt;STRONG&gt;mark&lt;/STRONG&gt; it &lt;STRONG&gt;correct&lt;/STRONG&gt; and close the thread so that it benefits future readers.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks and Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Muskan&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 19:50:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/need-help-on-script-to-populate-short-description-on-ritm/m-p/3316161#M3671</guid>
      <dc:creator>nemamuskan</dc:creator>
      <dc:date>2025-07-09T19:50:03Z</dc:date>
    </item>
  </channel>
</rss>

