- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 02:42 AM
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 03:29 AM
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>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 02:57 AM
Hi,
If you are referring to fetching data present in the table and showin in the html table in ui page then i suggest you check out existing ui pages. There are many OOB Ui pages which has similar features and you can try to replicate the same. you need to use jelly tags to loop through the data and show it on the ui page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 03:04 AM
Thanks for your reply.can you send any real time example?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 03:21 AM
Hi,
Here is sample UI page code where i have fetched data from the database table and dispalyed it in html table format.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true">
var gr = new GlideRecord('sys_user');
gr.setLimit(3);
gr.query();
</g:evaluate>
<table border="1">
<tr>
<td>First Name </td>
<td>Last Name</td>
<td>Email </td>
</tr>
<g:for_each_record file="${gr}">
<tr>
<td>${gr.getValue("first_name")}</td>
<td>${gr.getValue("last_name")}</td>
<td>${gr.getValue("email")}</td>
</tr>
</g:for_each_record>
</table>
</j:jelly>
Kindly mark the comment as a correct answer and also helpful if it has helped you to solve the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2021 03:26 AM
What i need to put in script?