<?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 display a field of type Image on a widget? in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619132#M190911</link>
    <description>&lt;P&gt;Hello Anil,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No worries, I got it solved now. it should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;img ng-src="{{::data.picture + '.iix'}}"/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and in server script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data.picture = grRec.getValue('u_image');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the help Anil &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 10:18:02 GMT</pubDate>
    <dc:creator>Jordan Dehneh</dc:creator>
    <dc:date>2021-08-18T10:18:02Z</dc:date>
    <item>
      <title>How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619124#M190903</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a field of type 'Image' which can take an image. I want to display this image on a widget I have. I tried showing it on the widget but it gives me a sys_id instead. How can I show it ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:53:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619124#M190903</guid>
      <dc:creator>Jordan Dehneh</dc:creator>
      <dc:date>2021-08-18T08:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619125#M190904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please refer the below link.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=d9c603a5db1cdbc01dcaf3231f9619bf"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=d9c603a5db1cdbc01dcaf3231f9619bf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ujjawal&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:57:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619125#M190904</guid>
      <dc:creator>Ujjawal Vishnoi</dc:creator>
      <dc:date>2021-08-18T08:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619126#M190905</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you have a image field on record then follow below steps:&lt;/P&gt;
&lt;P&gt;In server side script where you have written glideRecord to get image use below logic:&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;data.picture = grRec.u_image;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and to display image in use below login in Widget HTML script:&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;&amp;lt;img ng-src="{{::data.picture}}"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Anil Lande&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:03:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619126#M190905</guid>
      <dc:creator>Anil Lande</dc:creator>
      <dc:date>2021-08-18T09:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619127#M190906</link>
      <description>&lt;P&gt;Hello Ujjawal,&lt;/P&gt;
&lt;P&gt;I am trying to implement a list in the service portal. This list contains the list of all articles of category News. I want to show an image for each article. So in the list there will be rows and each row has an image. But when I display it, it gives me just the sys id even though the field Thumbnail has the image inserted/uploaded.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:06:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619127#M190906</guid>
      <dc:creator>Jordan Dehneh</dc:creator>
      <dc:date>2021-08-18T09:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619128#M190907</link>
      <description>&lt;P&gt;Also, You can take reference from below widget.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://instanceName.service-now.com/sp_config?id=widget_editor&amp;amp;sys_id=6e6ac664d710120023c84f80de610318"&gt;https://instanceName.service-now.com/sp_config?id=widget_editor&amp;amp;sys_id=6e6ac664d710120023c84f80de610318&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They are using&amp;nbsp; below code&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt; &amp;lt;div class="sub-avatar mia" ng-style="avatarPicture"&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and ng-style is being set in client script using below code.&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;$scope.avatarPicture = {
				'background-image': "url('" + response.sys_id + ".iix')",
				'color': 'transparent'
			};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ujjawal&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:06:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619128#M190907</guid>
      <dc:creator>Ujjawal Vishnoi</dc:creator>
      <dc:date>2021-08-18T09:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619129#M190908</link>
      <description>&lt;P&gt;Hi Jordan,&lt;/P&gt;
&lt;P&gt;You can take a help of OOB widget 'SC Category Page'.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/37566i49303F4B68626133/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/37564i33A4B593D071525F/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This widget has a logic to get All items details and display as list/card. You can implement same logic to display data and images as per your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Anil Lande&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:21:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619129#M190908</guid>
      <dc:creator>Anil Lande</dc:creator>
      <dc:date>2021-08-18T09:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619130#M190909</link>
      <description>&lt;P&gt;Thank you Anil. I have implemented the same solution you suggested but it shows an empty braces brackets in the src field. If I also did data.picture = grRec.getValue(u_image); it will show a sys_id instead. What do you suggest?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:22:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619130#M190909</guid>
      <dc:creator>Jordan Dehneh</dc:creator>
      <dc:date>2021-08-18T09:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619131#M190910</link>
      <description>&lt;P&gt;Not sure if it is typo in community reply, but your need to correct below line&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data.picture = grRec.getValue(u_image);&lt;/P&gt;
&lt;P&gt;it should be:&lt;/P&gt;
&lt;P&gt;data.picture = grRec.getValue('u_image');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Anil Lande&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:29:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619131#M190910</guid>
      <dc:creator>Anil Lande</dc:creator>
      <dc:date>2021-08-18T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a field of type Image on a widget?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619132#M190911</link>
      <description>&lt;P&gt;Hello Anil,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No worries, I got it solved now. it should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;img ng-src="{{::data.picture + '.iix'}}"/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and in server script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data.picture = grRec.getValue('u_image');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the help Anil &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 10:18:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-a-field-of-type-image-on-a-widget/m-p/619132#M190911</guid>
      <dc:creator>Jordan Dehneh</dc:creator>
      <dc:date>2021-08-18T10:18:02Z</dc:date>
    </item>
  </channel>
</rss>

