ui page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 11:25 PM - edited 08-28-2023 11:34 PM
Hi all,
I display records after query from sc_req_item table in ui page using table format, now i want to show 10 records per page using table structure in ui page means if 100 records found after query than 10 records will show in each page .Kindly share any idea how i can acheive that.
In ui page, html script:
var ritm = new GlideRecord('sc_req_item');
ritm.query('sys_created_by', ice.user_name);
ritm.orderByDesc('sys_created_on');
ritm.addEncodedQuery('sys_created_onONLast 30 days@javascript:gs.beginningOfLast30Days()@javascript:gs.endOfLast30Days()');
ritm.query();
var ritm_count =ritm.getRowCount();
</g:evaluate>
<j:if test='${ritm_count == 0 }'>
<center><h3>No RITM Records Found</h3></center>
</j:if>
<j:if test='${ritm_count != 0 }'>
<!-- <j:if test='${ritm.hasNext()}'> -->
<center><h3>Related Request Details</h3></center>
<table id="statsTable" class="table table-striped table-bordered hide-query-stats">
<tr>
<th>Number</th>
<th>State</th>
<th>Short Description</th>
<th>Description</th>
<th>Created</th>
<th>Updated</th>
</tr>
<j:while test="${ritm.next()}">
<tr>
<td>${ritm.number}</td>
<td>${ritm.state.getDisplayValue()}</td>
<td>${ritm.short_description}</td>
<td>${ritm.description}</td>
<td>${ritm.sys_created_on}</td>
<td>${ritm.sys_updated_on}</td>
</tr>
</j:while>
</table>
</j:if>
0 REPLIES 0