Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to sort reference field always in asending order

Dinesh Kumar C
Tera Contributor

Hello, on Incident form there is a reference field, for example assignment group and my client is expecting to show the reference pop-up always in ascending order rather than actual one. 

 

I tried to configure by following by below servicenow article but I could not see the attribute at all.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0725720

 

Please throw some inputs if you have any solution. Thank you!

3 REPLIES 3

RaghavMuthyam
Tera Guru

We can set a system-wide user preference so that all users receive the default setting unless they manually change it. 

User Preference Configuration:

  • Preference Name: TABLE_NAME.db.order

    • Value: The field name to be used for sorting.

  • Optional Sorting Direction:

    • Preference Name: TABLE_NAME.db.order.direction

    • Value: ASC or DESC (for ascending or descending order).

Important :

✔ Enable the "System" checkbox to apply the preference globally.

Example for the Incident Table:

  • incident.db.order → Value: number

  • incident.db.order.direction → Value: DESC

This ensures that incidents are sorted by the number field in descending order unless modified by the user.

 

Accept and hit Helpful if it helps.
Thank you,
Raghav.

Medi C
Giga Sage
Giga Sage

Hi @Dinesh Kumar C,

 

Please try below steps:

  • Right click on the label for the field you want to sort and choose: Configure Dictionary
  • In the Attributes related list, click the New button 
  • In Attribute input field, choose: Reference sequence
  • In the Value field, input the column name you wish to sequence on (technical name - not label)
  • Submit the attribute record

If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

Thank you Medi, but its not working 😞