How to modify the display order of list data in a custom table?

shiz
Tera Contributor

I have a custom list as follows:

shiz_0-1753434992598.png

I would like to sort the data based on the above fields during the initial display stage. How should it be set up?

 

3 ACCEPTED SOLUTIONS

Chaitanya ILCR
Kilo Patron

Hi @shiz ,

go to user preferences

ChaitanyaILCR_0-1753436223496.png

and create a new user preference

with name yourtablename.db.order

value with your field name (in this case it's module field backend name)

ChaitanyaILCR_3-1753436396420.png

 

replace <table_name> with your table name and <field_name> with your field name

and set system = ture

 

if you find any other user preference with name where user is populated delete those 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

View solution in original post

Pranesh072
Mega Sage
Mega Sage

Create 2 new entries on the user preference table [sys_user_preference]

 

[table name].db.order - Field name used for sort

[table name].db.order.direction - DESC/ASC

 

Mark them as system and delete any other same entries present for your custom table.

 

 

Pranesh072_0-1753436407617.png

 

View solution in original post

@shiz 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

anshul_goyal
Kilo Sage

Hello @shiz,

Configure List Layout with Default Sort Order

  1. Navigate to the list you want to customize.

  2. Right-click the column header (or gear icon) → ConfigureList Layout.

  3. Ensure your custom fields are included in the list view.

  4. Then, click the gear icon again → Sort.

  5. In the Sort dialog:

    • Select your fields (one or more) to define the default sort order.

    • Choose Ascending or Descending for each.

  6. Click OKSave.

Please mark my response as Accepted and Helpful for future references.

Thanks

shiz_0-1753435899900.png

I don't seem to have found the third step yet? How should I set up sort?

pawank2
Tera Expert

Hi Shiz,

Hi,

Navigate to the list view of your custom table.

Right-click on any column header and select Configure > List Layout. 
In the "List Layout" slushbucket, you will see the "Available" and "Selected" columns.
Move columns between "Available" and "Selected" using the arrows, and reorder the "Selected" columns by dragging and dropping them or using the up/down arrows.
Save the changes. This will affect the column display order for that specific view for all users, unless a user has personalized their own list layout.
can you please check?

GlideFather
Tera Patron

Hi @shiz 

 

any module global or scoped, hover over to the right and Edit module icon will appear:

KamilT_0-1753435857059.png



and update accordingly:

KamilT_1-1753435932425.png

 

Optimally do this for the Application - that is the collapsible pr expandable part:
Click Customer service to reorder the Cases and Open,
Click Problem to reorder the Open, Open- Unassigned, Change, ....

KamilT_2-1753436024731.png

 

 

Keep me updated on your progress

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */