We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to show customized ordered records in List view

Avee90
Tera Contributor

Hi everyone,

I have a custom table with the following fields: Category(Choice field with options: Application, General, Network, Software, Password), Order(String), and Inactive(Checkbox).

I'm trying to achieve the following:

  • Display all records where Category= General at the top.
  • After that, show records from other Category.
  • Within each Category, the Order field should be sorted alphabetically (A to Z) and Inactive is false.

Has anyone implemented a similar sorting logic or have suggestions on how to achieve this in a list view or through scripting?

Thanks in advance!

Avee90_0-1751262813684.pngAvee90_1-1751262862559.png

 

20 REPLIES 20

Swapnil Shirsik
Giga Guru

Did you try - Giving the same order number to General (may be zero) and then giving order number to the remaining ones alphabetically. Example - filter out the General ones then sort the remaining alphabetically and then specify order, Example - 11,13 etc.

 

Of course, this manual approach should help only if the option list is not huge.