To display a table view in a dialogue window

randeepnath
Mega Contributor

find_real_file.png

I want to display a popup window in that have to display Table view data with the Action combo box. Please help me via poviding steps.

Actually I have a table and need to display that table view inside that window.

1 ACCEPTED SOLUTION

Hi Randeep,



There is no need to create a UI page. Just use the code. It has GlideDialogWindow which displays the dialogue window.


Follow the steps below.


System definition > UI action.


Name: Popup Display List


Table: Incident


Action name: popup_display_list


Form button: True


Client: True


Onclick: popupDispList()


Script:


function popupDispList() {


      //Initialize the GlideDialogWindow


      var gdw = new GlideDialogWindow('display_incident_list'); // displays list of incident


      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();


}



Regards,


Uzma


View solution in original post

13 REPLIES 13

ghsrikanth
Tera Guru

The following community post may help you with some idea - on configuration of UI Action


How to render the iframe on the same page with ui action?


randeepnath
Mega Contributor

Hi



But I want Table View inside a dialogue window not in Iframe..


I have to load table view inside my dialogue window


touqeer
Mega Expert

Hi Randeep,



The below link will be helpful for this issue. It has script which displays list of incidents in a dialogue window. You can modify the script according to your requirement.


Displaying a Custom Dialog - ServiceNow Wiki



Regards,


Uzma


randeepnath
Mega Contributor

I want a dialogue window which displays a Table view and all the actions that we can do in that table. Say for eg: Can I display all incidents in a Custom dialogue window ?