How do I set a default sort for a related list

xiyan_li
Tera Contributor

Can someone tell me how to set a default order for the data in the related list on the table form, so that when any user opens it, the order I set is displayed.

I would appreciate it if someone could tell me the answer

xiyan_li_0-1726109776899.png

 

2 ACCEPTED SOLUTIONS

MG Casey
Mega Sage

You'll want to create a Relationship instead.

 

System Definition > Relationships

 

In the "Query with" section, be sure to add in your desired orders.

MGCasey_0-1726118912757.png

 

Once defined, you'll see this as a new option when you go to configure your Related Lists on that table.

 

View solution in original post

Rohit99
Mega Sage

Hi @xiyan_li,

You may follow the following thread.
https://www.servicenow.com/community/developer-forum/related-list-default-ordering/m-p/1782068

 

Please mark my response as correct and helpful if it helped solved your question.

 

Thanks,

Rohit Suryawanshi

View solution in original post

11 REPLIES 11

Rohit99
Mega Sage

Hi @xiyan_li,

You may follow the following thread.
https://www.servicenow.com/community/developer-forum/related-list-default-ordering/m-p/1782068

 

Please mark my response as correct and helpful if it helped solved your question.

 

Thanks,

Rohit Suryawanshi

xiyan_li
Tera Contributor

Hi Rohit99

This method sorts all the lists, but I only want to sort the related list records.