I want to sort My task widget open Approvals in descending order on esc portal?

mania
Tera Contributor

Hi

I want to sort My task widget open Approvals in descending order on esc portal?

Can you please help on this. It will helpful.

mania_0-1702914986606.png

 

Thanks in Advance!

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @mania 

 

Have a look here:

 

https://www.servicenow.com/community/developer-forum/my-approval-widget-sorting/m-p/1554404

 

https://www.servicenow.com/community/itsm-forum/how-to-show-records-in-descending-order-on-the-widge...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG 

I Have tried this code : gr.orderByDesc ('sys_created_on'); which you provided links but not working in my server script the same code. Can you please help me to where that code will be placing.

Can you please help me.

I have attached my Server script code screenshot's for your reference.

Thanks!
Mania

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @mania 

 

Sorry I am not coding expert here . But it should work.

 

@Community Alums @AshishKM  @Sanjiv Meher  @Anil Lande experts please advice. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Community Alums
Not applicable

Hi @mania ,

 Records are sorted in descending order of field "closed_at" if it is available, else they are sorted in descending order of field "sys_updated_on".

This issue has been fixed in Feb'23 (version 28.0.2) store release of Employee Center apps. Please request to upgrade to the fixed version to get a permanent fix.