- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 10:48 PM
I need to show a popup in incident from to show all the computer present in the computer table,how can i perform this with the help of glide window.
mainly all this must work in customized application scope
Please help me to solve it
this script i have used and this is showing pop up with exact information while using same script in global scope.But while working with private application scope this popup show as mentioned in the second image...
Please help me to solve it
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 05:09 AM
This script helped to get the data from table with a query values obtained from form.
function popupList() {
var num = g_form.getValue('field name');
var tableName = 'table name from which to query';
var url = tableName + '_list.do?';
url += 'sysparm_query=device_id=' + num;
//Open the popup
var w = getTopWindow();
w.popupOpenFocus(url, 'related_list', 950, 700, '', false, false);
}
note:
table and the buttons are created in the same application scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 10:54 PM
Create a UI Page. Inside UI page you can use <g:ui_reference> tag to show computer table as reference.
for ex: <g:ui_reference name="computer" id="computer" table="cmdb_ci_computer" />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 10:56 PM
Hi,
You can write this by GlideDialog window and implementing in UI Action button, there are many OOB UI Actions having GlideDialog window implementation in them -
You can go to list of UI Actions and query the script field for *GlideDialog
Displaying a Custom Dialog - ServiceNow Wiki
https://<yourinstancename>.service-now.com/sys_ui_action_list.do?sysparm_query=%5EscriptLIKEglidedialog&sysparm_first_row=1&sysparm_view=&sysparm_choice_query_raw=&sysparm_list_header_search=true#
Hopefully it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 11:42 PM
Hi Srikanth,
Thanks for the answer i have used this in the UI Action script but i am not able get the data from the computer table i have used this code. this is working when i created the same button on global application scope while i try to create it in application scope i am unable to get the same answer.
this the code i have used
function pop(){
var gdw = new GlideDialogWindow('display_incident_list');
gdw.setTitle('Incidents');
gdw.setPreference('table', 'incident_list');
gdw.setPreference('sysparm_view', 'default');
//Set the table to display
var num = g_form.getValue('number');
var query = 'active=true^priority=1^number!=' + num;
gdw.setPreference('sysparm_query', query);
//Open the dialog window
gdw.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016 11:55 PM
Could you please check the table which holds the computer information has proper access settings enabled in the table dictionary.
It should be accessible from another application scope.
Application Access Settings - ServiceNow Wiki
As you have mentioned, the functionality is working and its the access issue
Hope it helps