- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2014 02:32 PM
I wanted to know if you can set the max row count for a Knowledge Base list to 100? I know you can set it as a personalize per person but that makes all the list to max 100.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 02:15 PM
This is the line in kb_list UI Page where the rowcount preference of the current user is retrieved:
<j2:set var="sys_nav_count" value="$[gs.getUser().getPreference('rowcount')]" />
Create a new global user preference (System = true and User = <empty>) and substitute it into that line like this:
<j2:set var="sys_nav_count" value="$[gs.getUser().getPreference('my_custom_kb_rowcount')]" />
Now the system will use the value you specified in your custom global preference for all users.
You will also need to remove navigation elements that users normally use to change their rowcount preference because they will no longer work in your case and will only confuse people.
Comment out the following line of code to remove the Show context menu:
gcm.addMenu("${gs.getMessage('Show')}", mRowsPerPage);
Comment out this <select> block completely inorder to get rid of the "rows per page" dropdown list in the upper-right corner:
<select class="listbar_select" name='perrows' onchange="changeRowCount(this);" id='perrows'>
...
</select>
And that should be it.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2014 11:13 AM
The first thing that comes to mind is adding sysparm_force_row_count=100 parameter to the modules that open KB lists.
Navigating by URL - ServiceNow Wiki
Of course, with this approach your users will be able to change the number of records after the list has been displayed but at least initially they will always be getting 100 records.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2014 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 09:19 AM
Thank you both for your replies. This worked for half the issue I am facing. This is for CMS, and Knowledge Search works correctly by setting the sys_property 'glide.knowman.search.rowcount'. Is there a property to change the knowledge base list row counts /kb_list.do for all users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 10:10 AM
I am afraid kb_list UI page uses the same user preference as any other lists in the system. It is called 'rowcount'. If you need a fixed number of records on kb_list page, you will have to modify the code of the UI page. Good news — it is easy to do. Bad news — once you modify it, it will no longer be updated during upgrades.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/