<?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: How do we get the display value of reference cells in the multi-row variable set? i.e instead of in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/2408330#M480269</link>
    <description>&lt;P&gt;It did work, yes. It's been a couple years since I've worked on the instance this was deployed on. The target record must have copies of the variable (catalog task). Record producers - as long as you have a record to read with catalog variables in it, there shouldn't be any issue with printing it to a sufficiently spacious text field on some other (non-catalog / task) table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The post is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.servicenow.com/community/developer-articles/multi-row-variable-sets-composing-approval-and-task-descriptions/ta-p/2312638" target="_blank"&gt;https://www.servicenow.com/community/developer-articles/multi-row-variable-sets-composing-approval-and-task-descriptions/ta-p/2312638&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 20:12:41 GMT</pubDate>
    <dc:creator>Duodecimal</dc:creator>
    <dc:date>2022-12-07T20:12:41Z</dc:date>
    <item>
      <title>How do we get the display value of reference cells in the multi-row variable set? i.e instead of displaying the sys_id.</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502037#M73816</link>
      <description>&lt;P style="background-color: transparent; box-sizing: border-box; color: #303a46; font-family: &amp;amp;quot; roboto&amp;amp;quot;,&amp;amp;quot;sourcesanspro&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; margin: 0px 0px 10px 0px;"&gt;How do we get the display value of reference fields in the multi-row variable set? i.e instead of displaying the sys_id.&lt;/P&gt;
&lt;P style="background-color: transparent; box-sizing: border-box; color: #303a46; font-family: &amp;amp;quot; roboto&amp;amp;quot;,&amp;amp;quot;sourcesanspro&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; margin: 0px 0px 10px 0px;"&gt;I tried getDisplayValue() but it is giving as undefined.&lt;/P&gt;
&lt;P style="background-color: transparent; box-sizing: border-box; color: #303a46; font-family: &amp;amp;quot; roboto&amp;amp;quot;,&amp;amp;quot;sourcesanspro&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; margin: 0px 0px 10px 0px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 11:28:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502037#M73816</guid>
      <dc:creator>PD6</dc:creator>
      <dc:date>2019-02-05T11:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of displaying the sys_id.</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502038#M73817</link>
      <description>&lt;P&gt;The 'simplest' way is to call on a method within the script include VariableUtils, and you will need to pass the sys ID of the variable set, along with the multi-row variable object, as parameters. For the sys_id, normally you'd be able to use getGlideObject on the variable, but that doesn't return anything for multi-row variable sets.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variable set lives on item_option_new_set, so you can look for the variable name there in the internal_name field to get the sys_id:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var ios = new GlideRecord("item_option_new_set");
ios.get("internal_name", mrvs_name);
var setID = ios.sys_id;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Variable names, set or non-set, should be unique)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For the variable itself, that would just be current.variables.mrvs_name. So with that you can call on VariableUtils to get the display values in one swoop:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var vu = new VariableUtil(); 
var mrva = JSON.parse(vu.getDisplayValue(setID, current.variables.mrvs_name));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you can step through mrva (Multi-Row Variable Answers), which is an array of objects. Each array element is a row, and each row contains a name:value pair -- the name being the question variable name, and the value being the display value of the answer.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;for (var row = 0; row &amp;lt; mrva.length; row++) { 
   for (var question_name in mrva[row]) { 
      var displayValue = mrva[row][question_name];
   } 
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You'll need to do more work to get the question label, and to sort them in the same order as shown within the MRV and on the form itself, and so on.&amp;nbsp; Later today or tomorrow I'll be putting up the code I'm using to compose both HTML emails for approvals along with a plaintext output for catalog task or record producer descriptions - the code has to work for any catalog item, so hard-coding the names of various MRVS is a non-starter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 13:55:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502038#M73817</guid>
      <dc:creator>Duodecimal</dc:creator>
      <dc:date>2019-02-14T13:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of displaying the sys_id.</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502039#M73818</link>
      <description>&lt;P&gt;Is there a way to do this without scripting?&amp;nbsp; I'm trying to build a report to show the values in the mrvs and for the reference fields, it's showing the sys_id instead of the display value.&amp;nbsp; My SNow setup is controlled by a central office and I don't have access to any server side functions, such as script includes, email notifications and the like.&amp;nbsp; Is there a no-code way to show the display values in a report?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 11:22:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/502039#M73818</guid>
      <dc:creator>jd3737</dc:creator>
      <dc:date>2019-07-03T11:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/2408089#M480251</link>
      <description>&lt;P&gt;This is VERY helpful. Were you able to&amp;nbsp;&lt;SPAN&gt;get it working for the plaintext output for catalog task or record producer descriptions?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 16:32:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/2408089#M480251</guid>
      <dc:creator>Melissa Berry</dc:creator>
      <dc:date>2022-12-07T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/2408330#M480269</link>
      <description>&lt;P&gt;It did work, yes. It's been a couple years since I've worked on the instance this was deployed on. The target record must have copies of the variable (catalog task). Record producers - as long as you have a record to read with catalog variables in it, there shouldn't be any issue with printing it to a sufficiently spacious text field on some other (non-catalog / task) table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The post is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.servicenow.com/community/developer-articles/multi-row-variable-sets-composing-approval-and-task-descriptions/ta-p/2312638" target="_blank"&gt;https://www.servicenow.com/community/developer-articles/multi-row-variable-sets-composing-approval-and-task-descriptions/ta-p/2312638&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 20:12:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/2408330#M480269</guid>
      <dc:creator>Duodecimal</dc:creator>
      <dc:date>2022-12-07T20:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3099502#M530830</link>
      <description>&lt;P&gt;Did you end up having any success with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also had issues with reference fields in a multi-row variable set since it would only return the sys_id. I finally realized I could switch the variable to a Lookup Select Box, pick the table, and select specifically which field I wanted for the value and which field I wanted for the display. You also update the variable attribute so they can still search by adding 'is_searchable_choice=true'&amp;nbsp; &amp;nbsp;and check the box to enable the -- none -- option by default.&lt;BR /&gt;&lt;BR /&gt;....If you had some conditions on your reference variable, switch the reference qualifier to advanced real quick and copy the code. You'll put that under the ref_qualifier field when you switch it to a lookup select box.&lt;BR /&gt;&lt;BR /&gt;I got part of the idea from the solution provided to this question:&amp;nbsp;&lt;A href="https://www.servicenow.com/community/developer-forum/display-3-variables-value-in-lookup-select-box-drop-down/m-p/2043917" target="_blank" rel="noopener"&gt;https://www.servicenow.com/community/developer-forum/display-3-variables-value-in-lookup-select-box-drop-down/m-p/2043917&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example variable:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jesse_H_0-1731020120261.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/400313i71286A20D3C6D6CF/image-size/medium?v=v2&amp;amp;px=400" alt="Jesse_H_0-1731020120261.png" title="Jesse_H_0-1731020120261.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 22:55:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3099502#M530830</guid>
      <dc:creator>Jesse_H</dc:creator>
      <dc:date>2024-11-07T22:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3505935#M555553</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;The&amp;nbsp;VariableUtil API is documented? I couldn't find any documentation on it&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Mar 2026 15:27:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3505935#M555553</guid>
      <dc:creator>Yamilla Manjko</dc:creator>
      <dc:date>2026-03-11T15:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3506023#M555562</link>
      <description>&lt;P&gt;It's not in the api documentation based on a hasty search, but it is not a protected script include -&amp;nbsp;global.VariableUtil is fully readable.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 17:09:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3506023#M555562</guid>
      <dc:creator>Duodecimal</dc:creator>
      <dc:date>2026-03-11T17:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do we get the display value of reference cells in the multi-row variable set? i.e instead of</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3506042#M555566</link>
      <description>&lt;P&gt;But if it isn't documented, then ServiceNow does not consider it best practice to use the API because they can change or discontinue undocumented APIs in general without notice&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Note:&lt;BR /&gt;The publication of this list does not imply that these scriptable objects are for use by&lt;BR /&gt;customers, consultants, and partners. The use of the Glide prefix does not imply that these&lt;BR /&gt;scriptable objects are in the same category as or have the same status as objects such as&lt;BR /&gt;GlideRecord. &lt;STRONG&gt;Except where documentation is provided in the API Reference, these&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;undocumented APIs are not intended for general use, and ServiceNow, Inc., does not make&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;any commitment to document them, answer questions about them, or maintain them indefinitely&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;in their current form.&lt;/STRONG&gt; Over time, ServiceNow, Inc., intends to migrate a subset of the&lt;BR /&gt;functionality represented by these objects into the documented API and remove the rest.&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://www.servicenow.com/docs/r/xanadu/api-reference/scripts/c_PackagesCallRemovalTool.html?contentId=Rmsua2ESVWzx3FhVbE1R2A" target="_blank"&gt;https://www.servicenow.com/docs/r/xanadu/api-reference/scripts/c_PackagesCallRemovalTool.html?contentId=Rmsua2ESVWzx3FhVbE1R2A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 17:37:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-do-we-get-the-display-value-of-reference-cells-in-the-multi/m-p/3506042#M555566</guid>
      <dc:creator>Yamilla Manjko</dc:creator>
      <dc:date>2026-03-11T17:37:47Z</dc:date>
    </item>
  </channel>
</rss>

