How to take custom icons in Service Portal if relevant Glyph is not present ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 04:42 AM
I want to add a custom icon from db_image table into service portal for which i created an instance option "image" and i am able to select the image. All i need is to select the icon if glyph is not selected in the service portal instance and it is selected in the image in the option. Kindly help me with HTML code snippet to add the icon from the image table if glyph is not present.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 05:16 AM
Hi your image is broken. you can do like this in HTML widget
<div class="test" >
<span class="circle-span">
<img src="filename.png">// file name from image table
</span>
<div >
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 05:43 AM
I cannot hardcode the file name as I have to take different images from the table because i have reused same OOB widget several times in the portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 05:22 AM
hello
i think you must have a variable in server side call options.glyph.
Check like this
data.showImage= false;
if(options.glyph=='')
{
data.showImage=true;
}
else
{
data.showImage=false;
}
put this is server script
and in HTML you can check like below
<div ng-if="data.showImage==true">
<img src="your file name what you have save in db_image table"/>
</div>
please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 05:37 AM
I cannot hardcode the file name as I have to take different images from the table because i have reused same OOB widget several times in the portal.