How to get current value in UI page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2021 07:17 PM
Hi All,
I have UI page and i am calling the UI page from UI action in RITM Table and i want to display some of the value in the UI page when its open
i am using the below syntax to get the value from current form but its not working. provide me the current syntax
Number: $[current.getValue('number')]<br/>
Priority: $[current.getValue('priority')]<br/>
Impact: $[current.getValue('impact')]<br/>
State: $[current.getValue('state')]<br/>
<g2:evaluate var='jvar_id'>
var val = current.getValue('number');
val;
</g2:evaluate>
$[jvar_id]
<g2:evaluate var='jvar_id'>
var val = current.getValue('number').toString();
val;
</g2:evaluate>
$[jvar_id]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2021 08:50 PM
Hi
please see https://community.servicenow.com/community?id=community_question&sys_id=34574369db1cdbc01dcaf3231f96.... The answer for your question is described there.
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 03:04 AM
Hi
Did my reply answer your question?
If so, please mark the appropriate response as "correct" so that the question will appear as resolved for other users who may have a similar question in the future.
If not, please tell me what you are still missing.
Many thanks & kind regards
Maik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2021 09:03 PM
Hi, may this helps you
There is no default current object associated with a ui page, you need to pass in the sysid as a url parameter and then use gliderecord() to look it up and update it in the processing script or client script.
<g2:evalute jelly = "true">
var id = RP.getparameterValue("sysparn_sys_id");
var tb new GlideReocrd("Table_Name");
if(tb.get(id))
{
//You can access your record here
}
</g2.evaluate>
<p> Number : $[tb.priority.getDisplayValue()]</p>
And for UI Action you can refere : 'https://servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/'