How to get current form values in UI macro jelly script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 03:05 AM
Hi All,
I have created a formatter and UI macro. And formatter is added to incident form. Now i want to display current incident fields to the formatter.
Created UI macro with below script but it is not showing any values. Please help me.
<?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 sys_id = current.getValue('sys_id');
var gr = new GlideRecord("incident");
gr.addQuery('sys_id', sys_id);
gr.query();
gr;
</g:evaluate>
<j:if test="${jvar_gr.next()}">
<j:set var="jvar_phase2" value= "${gr.number} "/>
<j:set var="jvar_phase2" value= "${gr.priority} "/>
<j:set var="jvar_phase2" value= "${gr.impact} "/>
<j:set var="jvar_phase2" value= "${gr.state} "/>
</j:if>
</j:jelly>
TIA
Madhuri
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 09:15 AM
Is anyone aware if this can be done the other way around?
Meaning insert data displayed in the Macro into the DB?