- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 01:08 PM
I have a client who want to re-arrange the Category list in the Service Portal. For example, "Can We Help You" is in alphabetical order. Client wants to move it to the top of the list for their user. Can this be done with the OOB ? How can this done?
For example, in the screenshot "Can We Help You" is below the "Business Application..." Is there away to move Can We help You above making it first in the list?
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 12:44 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 01:10 PM
Hi,
I think you will have to edit the widget. The widget is called "Categories" and you will find this code on the server script.
var sc = new GlideRecord('sc_category');
sc.addQuery('sys_class_name', 'sc_category');
sc.addActiveQuery();
sc.orderBy('title');
data.sc_catalog = $sp.getValue('sc_catalog');
if (data.sc_catalog)
sc.addQuery('sc_catalog', data.sc_catalog);
Just change the sc.orderBy line to order how ever you want.
Reference : How to sort the list of categories in service portal(currently as per alphabetical order) as per our...
Mark Correct or Helpful if it helps.
***Mark Correct or Helpful if it helps.***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 12:34 PM
Yousaf,
This is the script for my OOB "Categorgies " (not my client). Please let me know this looks correct in the Server script ?starting at line 133 -145
Function queryCategory(catalogs, nestedLayout, dynamicCategory, startWindow, endWindow) {
var categoriesGr = new GlideRecord('sc_category');
categoriesGr.addQuery("sc_catalog", catalogs);
if (!dynamicCategory)
categoriesGr.addQuery("sys_class_name", "sc_category");
categoriesGr.addActiveQuery();
categoriesGr.orderBy('order');
categoriesGr.orderBy('title');
if (nestedLayout)
categoriesGr.addNullQuery("parent");
categoriesGr.chooseWindow(startWindow, endWindow);
categoriesGr.query();
return categoriesGr;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 12:44 PM
Loretta,
it looks perfect.
***Mark Correct or Helpful if it helps.***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 12:45 PM
Btw did my above answer worked? If it does can you please mark it correct also.
***Mark Correct or Helpful if it helps.***