- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 12:25 AM - edited 04-08-2024 12:26 AM
Hi all,
I have a UI action that calls UI Page.
I used the new GlideDialogWindows to render the UI Page as popup
function PopUIPage(){
var sysIds = g_list.getChecked();
var gdw = new GlideDialogWindow('ui_page');
gdw.setSize(750,300);
gdw.setPreference("sys_ids", sysIds);
gdw.render();
}
Then I try to get the 'sys_ids' on the UI Page.
Where I can get them? At the HTML? Client Script? I try every thing without any success.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:34 AM
Hi @Or Kalev2,
Hope you are doing well.
Proposed Solution
In order to achieve this task, I personally tried it on my "Personal Developer Instance" so that you can get the solution as soon as possible. For this, you just need to get all the "Sys IDs" in "HTML/XML Section" of your "UI Page" to get your query resolved. Attaching my Scripts and some snapshots of the outputs for your reference mentioned below: -
UI Action: -
function confirmAction() {
var sysIds = g_list.getChecked();
alert(sysIds);
var dialog = new GlideDialogWindow('incident_details');
dialog.setTitle('Incident Details');
dialog.setSize(550, 200); // consists of Height and Width
dialog.setPreference('sysparm_sysid', sysIds);
dialog.render();
}
UI Page: -
<?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 var="jvar_sysid" expression="RP.getWindowProperties().get('sysparm_sysid')" />
<p>${jvar_sysid}</p>
</j:jelly>
Outputs: -
If you find this information/knowledge/solution helpful, please don't forget to mark my solution and reply as helpful and accepted.
Thanks :)
Aakash Garg
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 02:12 AM
UI Action
UI Page - Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:34 AM
Hi @Or Kalev2,
Hope you are doing well.
Proposed Solution
In order to achieve this task, I personally tried it on my "Personal Developer Instance" so that you can get the solution as soon as possible. For this, you just need to get all the "Sys IDs" in "HTML/XML Section" of your "UI Page" to get your query resolved. Attaching my Scripts and some snapshots of the outputs for your reference mentioned below: -
UI Action: -
function confirmAction() {
var sysIds = g_list.getChecked();
alert(sysIds);
var dialog = new GlideDialogWindow('incident_details');
dialog.setTitle('Incident Details');
dialog.setSize(550, 200); // consists of Height and Width
dialog.setPreference('sysparm_sysid', sysIds);
dialog.render();
}
UI Page: -
<?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 var="jvar_sysid" expression="RP.getWindowProperties().get('sysparm_sysid')" />
<p>${jvar_sysid}</p>
</j:jelly>
Outputs: -
If you find this information/knowledge/solution helpful, please don't forget to mark my solution and reply as helpful and accepted.
Thanks :)
Aakash Garg
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 03:12 AM
Hi kalev2,
please use the below process,
UI page:
to get you parameter in UI page