Sortable functionality in my request columns in service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 11:17 AM
Hi All,
The Requirement is when we goto ESC portal , when we click on My Request , it display list of open tickets. but when we click on each column header it won't sort it. we need have functionality to when ever User click on each and every column, sorting of the columns should be feasible from a-z or z-a (in all columns).
and another requirement is there are two column Created and Updated, these two fields not displaying exact time and date , it displaying Ex. 1 day ego. but it should display exact timestamp. Ex. 2022-10-25 07:03:34.
for more info please find the screenshot.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 01:39 PM
Hi,
Refer to below link:
How to add default sorting for Data table widget in Service Portal
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 11:01 AM
Hi Aman,
What ever the configuration that suggested in KB not usefull in my requirement, for your information I have already gone through that , I need to have sort functionality for all columns.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 07:01 PM
Did you find any solution for this? How to apply sort for column in my request widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 07:53 PM
<tr>
<th ng-repeat="x1 in data.header"
ng-click="sort(data.fieldList[$index])">{{x1}}
<span class="sortorder descending"
ng-show="(sortKey==data.fieldList[$index] && reverse==false)"></span>
<span class="sortorder"
ng-show="(sortKey==data.fieldList[$index] && reverse==true)"></span>
</th>
</tr>
this you need to append in your html.
$scope.reverse = false;
$scope.sortKey = 'number';
$scope.sort = function (keyname) {
$scope.sortKey = keyname;
$scope.reverse = !$scope.reverse;
$scope.currentIndex=0;
}
append this function in you client script so you can get sorting and each colomn has a sorting actiong you can perform
Please mark helpfull if your resolve via this article.