- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 10:49 PM
I want to make default sort on "SortNum" column for all the user, how can we achieve that.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 10:56 PM
Hi,
this link has the solution
you need to update the user preference record
How to change the default sort order on the Knowledge Result Sort Widget
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2021 10:56 PM
Hi,
this link has the solution
you need to update the user preference record
How to change the default sort order on the Knowledge Result Sort Widget
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2021 12:45 AM
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 06:30 AM
Hii,
my query is, i have unique values and summing the disk_space value on unique value only and my problem is how the fetch the maximum values in that unique value means(how to get 2037.65 values in that) . plz sir write the code for fetching the maximum value in that unique value(only i want 2037.65)..
var a=[];
var gr = new GlideRecord('cmdb_ci_computer');
gr.addEncodedQuery('manufacturer.name=Lenovo');
gr.query();
while(gr.next()){
a.push(gr.os.toString());}
var au = new ArrayUtil();
var newChangeArr = au.unique(a);
gs.print("No of OS" +newChangeArr.length);
gs.print("List of OS" +newChangeArr );
for(i=0;i<newChangeArr.length;i++){
gs.print("Array " +newChangeArr[i]);
var gr1 = new GlideAggregate('cmdb_ci_computer');
gr1.addQuery('os',newChangeArr[i]);
gr1.addEncodedQuery('manufacturer.name=Lenovo');
gr1.addAggregate('SUM','disk_space');
gr1.setGroup(false);
gr1.query();
while(gr1.next()){
gs.info(gr1.getAggregate('SUM','disk_space'));
}}
This is output:-
Script execution history and recovery available here
*** Script: No of OS7
*** Script: List of OSWindows 2000 Advanced Server,Windows 2000 Server,Windows 2003 Standard,Windows XP,Windows 2000,Windows XP Professional,Windows 2000 Professional
*** Script: Array Windows 2000 Advanced Server
*** Script: 9.31
*** Script: Array Windows 2000 Server
*** Script: 4.00
*** Script: Array Windows 2003 Standard
*** Script: 640.00
*** Script: Array Windows XP
*** Script: 2037.65
*** Script: Array Windows 2000
*** Script:
*** Script: Array Windows XP Professional
*** Script: 522.24
*** Script: Array Windows 2000 Professional
*** Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 06:43 AM
Ankur,
I wanted to show In progress records first in list view. Please let me know how can I achieve that