- 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 10:11 PM
Hi Xuan,
Try:
<g:evaluate var="jvar_test">
var val = current.test_field;
val;
</g:evaluate>
Your variable will be passed on to the rest of the script as "jvar_test".
Note: If "test_field" is a reference and you are just passing the sys_id value, use "var val = current.test_field.toString();"
Thanks,
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2016 10:47 PM
Where are you using the ui macro?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2016 10:56 PM
Formatter.
- 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