How to display the table data in ui page?

Hulk1
Giga Contributor

Table data:

{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
  "userId": 2,
  "id": 2,
  "title": "delectus aut autem",
  "completed": false
  "userId": 3,
  "id": 3,
  "title": "delectus aut autem",
  "completed": true
}

How to retrieve these data from table and show it in ui page.
1 ACCEPTED SOLUTION

Nothing. Just update the html code with the one i gave and test it. In the html in this place you need to put your table name and add conditions if any using addQuery

<g:evaluate jelly="true">
		var gr = new GlideRecord('sys_user');
		gr.setLimit(3);
		gr.query();		
	</g:evaluate>

 

View solution in original post

11 REPLIES 11

Nothing. Just update the html code with the one i gave and test it. In the html in this place you need to put your table name and add conditions if any using addQuery

<g:evaluate jelly="true">
		var gr = new GlideRecord('sys_user');
		gr.setLimit(3);
		gr.query();		
	</g:evaluate>

 

Hulk1
Giga Contributor

Thanks!

 

Hulk1
Giga Contributor

hai if i have more than 100 records and i like to show only 20 records in first page. How to show the data with pagination?

Hulk1
Giga Contributor

hai if i have more than 100 records and i like to show only 20 records in first page. How to show the data with pagination?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I have shared solution here

Try to enhance it as per your requirement

Display records on custom table in UI page

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader