How to create a UI Page for Incident Table

shaik_irfan
Tera Guru

Hello,

 

I am able to create a UI Page can anyone please help me how to retrive the Incident Records to the UI PAge ?

 

find_real_file.png

1 ACCEPTED SOLUTION

nakuldani
Tera Contributor

Hi,

You can use jelly script components.

try below code in UI Page -> HTML.

<g:evaluate>
var gr = new GlideRecord('incident');
gr.query();
</g:evaluate>
<table id='incidents'>
<j:while test='${gr.next()}'>
<tr>
<td>${gr.number}</td>
<td>${gr.category}</td>
<td>${gr.assignment_group}</td>
..
..(you can write as many columns as you want)
..
</tr>
					
</j:while>
</table>

Thanks.

View solution in original post

9 REPLIES 9

Brad Tilton
ServiceNow Employee
ServiceNow Employee

That's definitely doable, and I would look through share apps to see if there's anything similar that you can download and modify.

Why use a UI Page instead of the default interface? Also, you could probably create a new service portal and page, and then use a list widget to create a view like this without any coding.

Brad,

 

I check in Share Apps i didnt find anything related to that. Reason of creating a UI Page to display in KB Article. Can you please help me on this or suggest any best practise to display a UI page on a KB Article

What is the overall requirement with this?

We need a create a UI Page for a Custom Table and display all the records, that UI Page needs to be called in a KB Article where user can go through the list.