Yes, we can modify your existing Jelly script to limit the display to only 35 rows.
We'll introduce a row counter (j:set and rowCount) and update the loop condition so the table renders only up to 35 KB records, even if there are more returned from the GlideRecord query.
✅ Final Updated Jelly Script - Limit to 35 KB Records
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:d="dynamicvariable">
<!-- Step 1: Get only specific KB numbers -->
<g:evaluate var="jvar_kb_gr" object="true">
var kbNumbers = [
'KB0010244', 'KB0011352', 'KB0010888', 'KB0010999', 'KB0010212',
'KB0011007', 'KB0010993', 'KB0010656', 'KB0010198', 'KB0010217',
'KB0010752', 'KB0010431', 'KB0010480', 'KB0010489', 'KB0010142',
'KB0010568', 'KB0010525', 'KB0010466', 'KB0010621', 'KB0010684',
'KB0010037', 'KB0010882', 'KB0010983', 'KB0010548', 'KB0010103',
'KB0010759', 'KB0011342', 'KB0010887', 'KB0011041', 'KB0010528',
'KB0011358', 'KB0011339', 'KB0011351', 'KB0010960', 'KB0011017'
];
var kb_gr = new GlideRecord('kb_knowledge');
kb_gr.addQuery('number', 'IN', kbNumbers.join(','));
kb_gr.addQuery('active', true); // Optional: only active
kb_gr.orderBy('short_description');
kb_gr.query();
kb_gr; // return object
</g:evaluate>
<!-- Step 2: Table display -->
<table class="kb-table">
<thead>
<tr>
<th>KB Number</th>
<th>Name</th>
<th style="width: 15%;">Link</th>
</tr>
</thead>
<tbody>
<j:set var="rowCount" value="0"/>
<j:while test="${jvar_kb_gr.next() && rowCount lt 35}">
<tr>
<td>${jvar_kb_gr.getValue('number')}</td>
<td>${jvar_kb_gr.getValue('short_description')}</td>
<td>
<a href="/kb_view.do?sysparm_article=${jvar_kb_gr.getValue('number')}" target="_blank">
View Article
</a>
</td>
</tr>
<j:set var="rowCount" value="${rowCount + 1}"/>
</j:while>
<j:if test="${rowCount eq 0}">
<tr>
<td colspan="3">None of the specified knowledge articles were found.</td>
</tr>
</j:if>
</tbody>
</table>
<!-- Optional Styling -->
<style type="text/css">
.kb-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
.kb-table th, .kb-table td {
padding: 8px;
border: 1px solid #dee2e6;
text-align: left;
}
.kb-table th {
background-color: #f8f9fa;
font-weight: bold;
}
.kb-table a {
color: #007bff;
text-decoration: none;
}
.kb-table a:hover {
text-decoration: underline;
}
</style>
</j:jelly>
✅ What Was Added: