Showing image from an Image field in a Jelly page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2012 03:26 PM
I have a table with some text fields and an Image field. On my Jelly page, I can pull records from my table and show the text columns just fine - ${gr.u_name} and the like. I cannot for the life of me figure out how to display the image field. ${gr.u_image} just shows up as nothing. I've also tried combinations like and ${gr.u_image.url} and pretty much anything else I can think of. How do I show my u_image field's image?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2012 09:51 PM
It's really hard to help without having the full picture. Post your entire XML.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2012 04:28 AM
What you need to do is query the sys_attachment table for the sys_id of the image.
Fields to query on
table_name = table of the URL field.
file_name = name of the URL field.
table_sys_id = the sys_id of the record in the table that has the URL field you are trying to get the image for.
Then your link will look like this
This is the only way I know of to do it, so if someone has a better/faster way I would like to know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2012 06:29 AM
Thanks, Drew, that worked great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2012 08:58 AM
The following in a UI Page will show Beth Anglin's user photo:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_usr_image">
var gr = new GlideRecord('sys_user');
gr.get('user_name', 'beth.anglin');
gr.photo.getHTMLValue();
</g:evaluate>
<g:no_escape>${jvar_usr_image}</g:no_escape>
</j:jelly>
Hope that points you in a useful direction!