<?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 to use &amp;quot;name&amp;quot; instead of &amp;quot;display name&amp;quot; for a reference field in one spe in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294620#M1210075</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/511979"&gt;@beycos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It’s not possible unless the 'Display Name' is set to True. This behavior is by design and is the standard out-of-the-box functionality."&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jun 2025 10:58:15 GMT</pubDate>
    <dc:creator>Dr Atul G- LNG</dc:creator>
    <dc:date>2025-06-20T10:58:15Z</dc:date>
    <item>
      <title>How to use "name" instead of "display name" for a reference field in one specific table only</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294597#M1210071</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reference field shows the &lt;STRONG&gt;Display Name&lt;/STRONG&gt; from table &lt;STRONG&gt;X&lt;/STRONG&gt;, as expected, since the &lt;STRONG&gt;Display Name&lt;/STRONG&gt; field has Display = true. Without changing this setting, is it possible to use the &lt;STRONG&gt;Name&lt;/STRONG&gt; field for the reference field, but only in one specific table?&lt;/P&gt;&lt;P&gt;Thank you and Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Beyza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 10:48:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294597#M1210071</guid>
      <dc:creator>beycos</dc:creator>
      <dc:date>2025-06-20T10:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "name" instead of "display name" for a reference field in one spe</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294609#M1210073</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/511979"&gt;@beycos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;whatever field is marked with Display=True it will show that value once reference value is selected&lt;/P&gt;
&lt;P&gt;Without touching the Display=True at dictionary you can't control what's seen there.&lt;/P&gt;
&lt;P&gt;If my response helped please mark it correct and close the thread so that it benefits future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 10:53:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294609#M1210073</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-06-20T10:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "name" instead of "display name" for a reference field in one spe</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294620#M1210075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/511979"&gt;@beycos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It’s not possible unless the 'Display Name' is set to True. This behavior is by design and is the standard out-of-the-box functionality."&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 10:58:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294620#M1210075</guid>
      <dc:creator>Dr Atul G- LNG</dc:creator>
      <dc:date>2025-06-20T10:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "name" instead of "display name" for a reference field in one spe</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294686#M1210083</link>
      <description>&lt;P&gt;Can’t we do this by changing the view? By creating a new view , but without "display name"&amp;nbsp; in the new view?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 11:50:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294686#M1210083</guid>
      <dc:creator>beycos</dc:creator>
      <dc:date>2025-06-20T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "name" instead of "display name" for a reference field in one spe</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294738#M1210098</link>
      <description>&lt;P&gt;A view is simply a way to control what you want to display (which fields to show), but the display logic is handled at the table level. Since the same field is being used across views, what you're asking isn't possible&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/511979"&gt;@beycos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 12:29:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3294738#M1210098</guid>
      <dc:creator>Dr Atul G- LNG</dc:creator>
      <dc:date>2025-06-20T12:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "name" instead of "display name" for a reference field in one spe</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3324129#M1216359</link>
      <description>&lt;P&gt;Hello again Atul,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, in the CMDB table, the "Display Name" field is set to Display = true, and it shows the value in the format (name - company name). However, in table X, I want to use only the name field (not the full display name) in a reference field.&lt;/P&gt;&lt;P&gt;I'm trying to find an alternative solution for this.&lt;/P&gt;&lt;P&gt;I created a new string field and I'm attempting to use a &lt;STRONG&gt;Client Script&lt;/STRONG&gt; to populate it with only the part of the reference field's display value &lt;STRONG&gt;up to the first dash (-)&lt;/STRONG&gt;.&lt;BR /&gt;After that, I plan to hide the reference field.&lt;/P&gt;&lt;P&gt;I wrote the following script, but it's not working yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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; g_form.getReference(&lt;/SPAN&gt;&lt;SPAN&gt;'u_business_product_or_service_name'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(ref) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (ref) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; displayValue = ref.getDisplayValue();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (displayValue) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; shortValue = displayValue.split(&lt;/SPAN&gt;&lt;SPAN&gt;'-'&lt;/SPAN&gt;&lt;SPAN&gt;)[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].trim();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_form.setValue(&lt;/SPAN&gt;&lt;SPAN&gt;'u_short'&lt;/SPAN&gt;&lt;SPAN&gt;, shortValue); &lt;/SPAN&gt;&lt;SPAN&gt;// Show only the part before dash&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Could I get your opinion or suggestions on this?&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Beyza&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 09:27:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-use-quot-name-quot-instead-of-quot-display-name-quot-for/m-p/3324129#M1216359</guid>
      <dc:creator>beycos</dc:creator>
      <dc:date>2025-07-17T09:27:46Z</dc:date>
    </item>
  </channel>
</rss>

