- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 08:15 AM
Hi All,
I have created a UI Macro and need to make it visible only to requester. Requester value is stored in opened by field
<j:set var="jvar_opened" value="${jvar_gr.getValue('opened_by')}"/>
Does jvar_opened contain sys_id of requester ?
Also I have tried with 'table_name.opened_by' and 'current.opened_by' . But it returned null.
Please help me with this. I need to get the sys_id of opened_by field in UI macro
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:00 AM
My bad. You need to use phase 2 . Here you go
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate var="jvar_page" jelly="true">
var page=current.opened_by;
page;
</g2:evaluate>
<g2:evaluate var="jvar_login_user" jelly="true">
gs.getUserID();
</g2:evaluate>
<html>
<head>
<script>
</script>
</head>
<body>
<j2:if test="$[jvar_page ==jvar_login_user]" >
<p>Show content</p>
</j2:if>
<p> here $[jvar_page]</p>
</body>
</html>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 09:51 AM
Returning null means
value printing for ${jvar_page} is null

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:17 AM
Let me know how this goes.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:00 AM
My bad. You need to use phase 2 . Here you go
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate var="jvar_page" jelly="true">
var page=current.opened_by;
page;
</g2:evaluate>
<g2:evaluate var="jvar_login_user" jelly="true">
gs.getUserID();
</g2:evaluate>
<html>
<head>
<script>
</script>
</head>
<body>
<j2:if test="$[jvar_page ==jvar_login_user]" >
<p>Show content</p>
</j2:if>
<p> here $[jvar_page]</p>
</body>
</html>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:18 AM
Hi Abhinay,
I dont know what the issue with my code, This time it didnt return any values for me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:21 AM
Clear your cache and then remove the formatter form the layout and save it. Then add the formatter back on to the form.