<?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: Sys_id to string value. in ITOM forum</title>
    <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912738#M18188</link>
    <description>&lt;P&gt;Hi Chad,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;if &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;appowner&lt;/SPAN&gt; is a reference field to the sys_user field then it will work as expected, else you will have to extract the user name from this &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;name.u_appowner&lt;/SPAN&gt; in the same was as you extracted &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner from &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;application_name&lt;/SPAN&gt;, ie using &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;getReference&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;a better approach will be &amp;nbsp; that you pass a&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;pplication_name to a script include using glideajax and there you can directly extract the &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner and get the display value of &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner&lt;/SPAN&gt; by using .getDisplayValue().&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Sep 2014 16:20:50 GMT</pubDate>
    <dc:creator>Anurag Tripathi</dc:creator>
    <dc:date>2014-09-24T16:20:50Z</dc:date>
    <item>
      <title>Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912736#M18186</link>
      <description>&lt;P&gt;I'm new to service now administration so please bare with me. I'm building a form and I need a few fields to autofill the information and its returning the user name as the sys_id not the string value. any help would be greatly appreciated &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;function onChange(control, oldValue, newValue) {&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; var name = g_form.getReference('application_name');&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; g_form.setValue('appowner', name.u_appowner);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;the appowner field is populating the correct users sys_id but I need it as the actual name. Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2014 15:42:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912736#M18186</guid>
      <dc:creator>charmon</dc:creator>
      <dc:date>2014-09-24T15:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912737#M18187</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;var name = g_form.getReference('application_name').fieldname;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;...where '&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;fieldname&lt;/SPAN&gt;' is the field name of the User table where the name of the person is stored.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;also, 'name' is widely used...I recommend 'myName' instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;OR....try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #f6f6f6; font-family: arial, sans-serif;"&gt;var myName = g_form.getDisplayValue('application_name');&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #f6f6f6; font-family: arial, sans-serif;"&gt;g_form.setValue('appowner', &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;myName );&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2014 16:05:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912737#M18187</guid>
      <dc:creator>salvadormar</dc:creator>
      <dc:date>2014-09-24T16:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912738#M18188</link>
      <description>&lt;P&gt;Hi Chad,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;if &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;appowner&lt;/SPAN&gt; is a reference field to the sys_user field then it will work as expected, else you will have to extract the user name from this &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;name.u_appowner&lt;/SPAN&gt; in the same was as you extracted &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner from &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;application_name&lt;/SPAN&gt;, ie using &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;getReference&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;a better approach will be &amp;nbsp; that you pass a&lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;pplication_name to a script include using glideajax and there you can directly extract the &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner and get the display value of &lt;SPAN style="color: #666666; font-family: arial, sans-serif; background-color: #f6f6f6;"&gt;u_appowner&lt;/SPAN&gt; by using .getDisplayValue().&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2014 16:20:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912738#M18188</guid>
      <dc:creator>Anurag Tripathi</dc:creator>
      <dc:date>2014-09-24T16:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912739#M18189</link>
      <description>&lt;P&gt;Using the .getDisplayValue() should give you what you are looking for.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666; background-color: #f6f6f6;"&gt;function onChange(control, oldValue, newValue) {&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666; background-color: #f6f6f6;"&gt; &amp;nbsp; &amp;nbsp; var name = g_form.getReference('application_name');&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666; background-color: #f6f6f6;"&gt; &amp;nbsp; &amp;nbsp; g_form.setValue('appowner', name.u_appowner&lt;STRONG&gt;.getDisplayValue()&lt;/STRONG&gt;);&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666; background-color: #f6f6f6;"&gt;}&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2014 16:29:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912739#M18189</guid>
      <dc:creator>Ken83</dc:creator>
      <dc:date>2014-09-24T16:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912740#M18190</link>
      <description>&lt;P&gt;Thank you for all the quick responses. The community involvement is rather refreshing.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Kenneth, when I used that .getDisplayValue()) it wouldn't return the sys_ID of the user anymore. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Anurag you win the prize on this one...... the appowner field was set to a single line text I changed it to a refrence to the sys_users and it resolved the issue..... &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;just so I dont get to many eye rolls on this, I have no training in service-now admin at all. I walked in one day and was told Hey guess what you are in charge of now........ so everything is self taught. alot of looking at what the company already had setup and trying to duplicate it on new work...... unfortunately it appears that a lot wasn't setup in the most e&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;fficient manor to begin with. &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Again thank you for all the help everybody its much appreciated and I'm sure you will all be hearing from me again!!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2014 16:52:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912740#M18190</guid>
      <dc:creator>charmon</dc:creator>
      <dc:date>2014-09-24T16:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912741#M18191</link>
      <description>&lt;P&gt;I just experienced the same issue and your posting resolved it.....thanks a bunch !!! &amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jan 2015 14:06:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912741#M18191</guid>
      <dc:creator>Victor Ruiz</dc:creator>
      <dc:date>2015-01-06T14:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912742#M18192</link>
      <description>&lt;P&gt;can you please provide us example with some code? i am experiencing similar issue&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2015 04:17:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912742#M18192</guid>
      <dc:creator>rajvirk</dc:creator>
      <dc:date>2015-10-07T04:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912743#M18193</link>
      <description>&lt;P&gt;What exactly do you want to achieve....this is an old post....and if going through it doesn't solve ur issue then....tell me what you are trying&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2015 08:37:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912743#M18193</guid>
      <dc:creator>Anurag Tripathi</dc:creator>
      <dc:date>2015-10-07T08:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sys_id to string value.</title>
      <link>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912744#M18194</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I used the below code to copy list collector values to a text box in order to include the variable in my flow designer email.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var myName = g_form.getDisplayValue('application_name');&lt;/P&gt;
&lt;P&gt;g_form.setValue('appowner',&amp;nbsp;myName );&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 17:12:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itom-forum/sys-id-to-string-value/m-p/912744#M18194</guid>
      <dc:creator>Troya1</dc:creator>
      <dc:date>2021-11-17T17:12:17Z</dc:date>
    </item>
  </channel>
</rss>

