- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 03:49 AM
Hi guys,
I want to display an image that i have stored in SN database i.e., System UI > images.So help me out to use that image in my form layout.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 04:35 AM
You would need to create a UI macro and formatter for the table.
Suppose you need to display an image on incident form.
Creating a Formatter - ServiceNow Wiki
1. Create a new UI macro 'Example' and put some html there to keep the image in it. somewhat like <img src = 'abc.png'/>
2. Go To Formatters and create a new Formatter
Name - Incident Image Formatter - Example.xml
Table - Incident
3. Go to formlayout for Incident form and drag the "Incident Image" from avaiilable to selected bucket.
I hope it clears.
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 04:33 AM
You could add a macro field and then create a macro with the following code:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<img src="YOUR_IMAGE.JPG" height="100px" width="100px"/>
</j:jelly>
Just replace the image source and height/width
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 04:35 AM
You would need to create a UI macro and formatter for the table.
Suppose you need to display an image on incident form.
Creating a Formatter - ServiceNow Wiki
1. Create a new UI macro 'Example' and put some html there to keep the image in it. somewhat like <img src = 'abc.png'/>
2. Go To Formatters and create a new Formatter
Name - Incident Image Formatter - Example.xml
Table - Incident
3. Go to formlayout for Incident form and drag the "Incident Image" from avaiilable to selected bucket.
I hope it clears.
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 05:12 AM
Thanks Deepak and Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 05:35 AM
Hi Deepak,
Is there anyway to make a formatter visible on list view?
Can we create a field dependency for a formatter ?