- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 01:49 AM
UI action code :-
function recordValue()
{
var num = g_form.getValue('number'); // get the value to pass into the dialog.
alert('num is'+ num);
var gdw = new GlideDialogWindow('task_info_dialog'); // Initialize and open the dialog window
gdw.setTitle("Record is:");
gdw.setPreference("num1", num);
gdw.render();
}
UI PAge code in HTML section -
<?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:ui_form>
<!-- Get values from dialog preferences passed in -->
<g:evaluate var="jvar_num1" object ="true" expression="RP.getWindowProperties().get('num1')" >
gs.log('inside ui page');
gs.log('number is:' +number);
var gr = new GlideRecord('sc_task');
gr.addQuery('number',${jvar_num1});
gr.query();
gr;
</g:evaluate>
<j:while test="${jvar_gr.next()}">
<g:ui_multiline_input_field name="dial_comments" id="dial_comments" label="number" value="${jvar_num1}" mandatory="true" />
</j:while>
</g:ui_form>
</j:jelly>
_____________________________________________________________________________________
but I am unable to get value of num1 from UI action script
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 02:24 AM
Hey Shreya,
For accessing the jelly variable in g:evaluate use jelly = "true" that will allow you to use jelly variables in g:evaluate
Like this -
Thats UI Action -

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 02:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:12 AM
Hi nayan...
I have used below code to display value of reference field. However it is not working. Could you please check if it's correct?
<tr><td>Assigned To:</td><td>${jvar_gr.assigned_to.getDisplayValue()}</td></tr>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:23 AM
Wrote like that -
${jvar_gr..getDisplayValue('assigned_to')};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:44 AM
while writing UI page do I have to select category as well? If it's then which should I use?
For now I have used general category.