- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 05:08 AM
Solved! Go to Solution.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 05:54 AM
Hi Jonathan,
Please take a look at the contextual search and limit the number of articles from there:
in the for:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 06:31 AM
If you are using the out-of-the-box topic or similar, in that case, have a look at the Script Variable "limit":
The limit is actually applied on the User Input "KB Selection".
The script for this contains vaVars.limit:
(function execute() {
/*
Pagination buttons for suggested KB articles.
*/
var options = [];
var limit = parseInt(vaVars.limit);
var index = parseInt(vaVars.index);
if (index >= limit) {
options.push({ 'value': 'show_prev', 'label': gs.getMessage('Show previous')});
}
if (index+limit < vaVars.kbResultCount) {
options.push({ 'value': 'show_next', 'label': gs.getMessage('Show more')});
}
options.push({ 'value': 'new_search', 'label': gs.getMessage('Try a different search')});
options.push({ 'value': 'cancel', 'label': gs.getMessage('I\'m done')});
return options;
})()
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 06:58 AM
Thank you both, now the problem is solved

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2019 10:22 AM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2021 06:48 AM
Hi Jonathan,
Was the OOB Contextual Search topic block was used for this? Could you kindly provide the actual steps followed to display 5 KB articles in VA. We tried the above solution. However, its not working as expected.
Regards,
Arpitha G