- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 09:09 PM
Hi all,
Basically, I need a UI macro to retrieve the value of a filed from the current record.
I tried the following jelly script, it returns null.
<g:evaluate var="jvar_test">
var val = ${ref}.test_field;
</g:evaluate>
I also tried this, it doesn't work.
<j:set var="jvar_test" value="${current.test_field}">
Can anyone help?
Thanks in advance.
Xuan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 11:13 PM
Try below
<g2:evaluate var='jvar_id'> |
var val = current.getValue('caller_id');
val; | ||
</g2:evaluate>
$[jvar_id] // will print the sysid of caller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 11:26 PM
It's working.
Thanks so much!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2017 03:57 AM
Hello Ashish ,
I used the below code to get the value of caller from incident.
<?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 object="true" var="jvar_gr">
var user_sys_id = current.getValue('caller_id');
gs.log("userID:"+userID );
var gr = new GlideRecord("sys_user");
gr.addQuery('sys_id', user_sys_id);
gr.query();
gr;
</g:evaluate>
<j:if test="${jvar_gr.next()}">
<j:set var="jvar_phase2" value= "${gr.u_dsid} "/>
</j:if>
<a href= 'xxxx://users/${jvar_phase2}' >click here</a>
</j:jelly>
But the user_sysid is giving null . sometimes the code below this line won't be executed . Could you please suggest if any change needs to be done?
Thanks ,
Adarsh S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 10:56 PM
Hi Brian,
It returns null.