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

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.

 

Because my related list is actually done in the system UI -> Related List, do I need to create another related list in System Definition > Relationship

Yes, correct. If the ordering is that important, you'll need to make a brand-new Relationship record.

After creating the relationship-related list, click the [new] button at the top right of the relevant list. After creating a piece of data, can the data be automatically associated with the Relationship

Thank you very much, I have created a new Relationships and implemented my function