HRSD Favourite Articles - OOB Sorting Capabilities
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I am currently assessing enhancement options for the OOB Favourite Articles functionality in HRSD.
At present, the available OOB sorting options appear to be:
- Recently Accessed
- Date Added (Newest)
- Date Added (Oldest)
Has anyone implemented or identified an OOB approach to support the following sorting options?
- Alphabetical sorting (A-Z)
- Country-based sorting
If these capabilities are not available OOB, I would appreciate any guidance on the recommended customization approach, along with any known considerations or impacts associated with modifying this global functionality.
Thank you in advance for your assistance.
Kind regards,
Arshad Rashid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @MdArshadR ,
For the alphabetical sorting, I was looking at this docs page which talks about alphabetical sorting. The KB referenced for a fix is retired but here is some info from it (it's not published since it is out of date so take it with a grain of salt):
'sn_ex_sp_st_favorite' is a remote table which internally brings data from 'sp_favorite' table, primary_display and other columns are not present at 'sp_favorite' table that's why the 'order by' is not working as expected.
To achieve sorting on the remote table column(e.g. primary_display), remove 'chooseWindow' from gliderecord query, this would bring all the favorites sorted by 'order by' columns then iterate over these records to get the records in a window you are interested in.
For the country, first decide whether this means ordering by an article’s applicable country, grouping by country, or prioritizing the employee’s country. Identify an authoritative metadata source and define treatment of global, multi-country and unclassified articles. For your scope, explicitly decide whether the new options apply only to articles or to all favorite content types. Employee Center favorites are shared across content types and access points.
I would also recommend cloning the widget that already has sorting as a great foundation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Arshad, as far as I know, those two sort options are not available OOB. The Favourite Articles sort choices in Employee Center and HRSD are fixed to Recently Accessed and the two Date Added options, and I’m not aware of a system property that adds more. I can’t confirm the exact widget and table names without checking your instance, so please verify them as you go.
Alphabetical is the easier one. Favourites are stored per user and point to the knowledge article, so the title is reachable through that reference. Country is harder, because knowledge articles don’t carry a country field by default. You would need to decide where the country comes from first, such as a custom field on the article, the article’s user criteria, or the knowledge base.
Here is the approach I would take.
- Find the widget that renders the favourites list in Service Portal > Widgets, or in the Employee Center page in UI Builder, depending on your release.
- Do not edit the OOB widget directly. Clone it, or use an OOB extension point if one exists, and use the clone on your page.
- In the clone’s server script, add the new sort values to the sort options list.
- Add an ORDER BY on the article’s short description for A-Z.
- For country, add a custom Country field on kb_knowledge (or use an existing one) and sort on that field.
- Test with a user who has a mix of favourites across countries.
Build this in a scoped app or a dedicated update set, and test on a sub-production instance first.
The main risk is upgrades. A cloned widget will not pick up future OOB fixes, so you will need to compare it after each family release. Also, the Employee Center page is shared by all users, so your change affects everyone, not only HR. If you only need it for HR users, you can limit the cloned widget to those audiences through page or role conditions.
If you tell me your release, whether you use Employee Center or the older Service Portal, and where country lives on your articles, I can narrow the steps down.