UI Macro GlideModal('show_list')

Mahendra RC
Mega Sage

Hi All,

Can anyone please help me to understand what does GlideModal('show_list') represents(is it UI Macro, UI Page or something else)in the below code and where can I find this 'show_list'.

var gdw = new GlideModal('show_list');

  gdw.setTitle(title);

  gdw.setSize(750);

  gdw.setPreference('table', 'incident_list');

  gdw.setPreference('sysparm_query', query);

  gdw.setPreference('title', 'A New Title');

  gdw.render();

the above code is a part of UI Macro 'user_show_incidents' provided by ServiceNow.

UI Macro SS.PNG

Please let me know if anyone knows anything about this?

Thanks in Advance!!

10 REPLIES 10

Thanks Ujjawal for quick reply, but I search for UI Page with name as 'show_list' and I didn't found any ui page with this name


Plissken
Tera Expert

No, unfortunately 'show_list' is not a UI Page or UI Macro, I have searched in Kingston and cannot find it, it does not look like it conforms to the traditional process. If anyone actually knows where this is it would be great to know thanks.

 

Martin

Same here, I thought it was regular UI Page but I am not able to find it.

show_list is actually nothing. It's ignored because the real param that matters here is "table".

GlideModal uses the RenderInfo processor and that looks at the preference name "table" to decide what ui page to show. In this case table = incident_list

The platform then decides to use the list template because it's a table + list suffix. Don't worry if this is confusing because it's all hidden away in the inner workings of the platform.

The real thing to take away from this is:

 

 

var m = new GlideModal("some_ui_page");
m.render(); // Will render a ui page


var m = new GlideModal("some_ui_page");
m.setPreference('table', 'incident_list');
m.render(); // Will render the incident list

will_leingang
ServiceNow Employee
ServiceNow Employee

show_list is actually nothing. It's ignored because the real param that matters here is "table".

GlideModal uses the RenderInfo processor and that looks at the preference name "table" to decide what ui page to show. In this case table = incident_list

The platform then decides to use the list template because it's a table + list suffix. Don't worry if this is confusing because it's all hidden away in the inner workings of the platform.

The real thing to take away from this is:

  

var m = new GlideModal("some_ui_page");
m.render(); // Will render a ui page


var m = new GlideModal("some_ui_page");
m.setPreference('table', 'incident_list');
m.render(); // Will render the incident list