How to show records in descending order on the widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2022 12:35 AM
Hi All ,
The request widget on portal is type of 'Simple list' widget and showing records in ascending order, How can I make widget show the records in descending order.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2022 12:56 AM
Which widget are you referring to in your screenshot? I found My Request widget in my PDI and the server script has sorting in DESC order.
Just ctrl+right click on your widget and select Widget in editor and check the server part for how the GlideRecord is being built. It seems the ordering cannot be defined by instance option parameter.
If you want to change the behavior you would have to clone the widget, adjust the code according to your needs and replace it on the main page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2022 01:03 AM
Hi,
Thanks for reply.
I am using simple list widget. How can I do that in simple list widget.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2022 02:27 AM
Hi Obito,
it seems a bit weird to me. The simple list has this code in server part
this parameter is not defined in the instance, but for some reason the widget is reading it from somewhere (if you ctrl+right click on the widget on the main page and select 'Log to console: $scope' and open the browser dev tools you see this
Normally, you would go to the widget instance and add this bit
this however is not working for me (it keeps the 'asc' value.
What however helped was to
- clone the widget
- edit options schema and add order_direction parameter there and set value to desc
- added the new widget to the page instead of the default one
This is not ideal but works. Let me know if you get stuck somewhere