Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
If you have a Reference field where you use a choice list, you cannot sort using attribute ref_ac_order_by - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • If you have a Reference field where you use a choice list, you cannot sort using attribute ref_ac_order_by
KB0535733

If you have a Reference field where you use a choice list, you cannot sort using attribute ref_ac_order_by


9767 Views Last updated : Aug 5, 2024 public Copy Permalink
KB Summary by Now Assist

Description

If you have a Reference field on a form and you use a choice list under "Choice", you cannot sort using the attribute ref_ac_order_by on the dictionary entry. It always sorts alphabetically regardless of any dictionary attributes.




Steps to Reproduce

  1. Create new table named toys with the fields Name and Order.
    Ensure that you name the column order and not u_order or the dictionary attribute will have to be adjusted.
  2. Insert some names and orders that are not in line with their alphabetical sorting.
    See attached screenshot as an example. 
  3. Go to incident.do.
  4. Personalize the dictionary by adding a new one with the following attributes:
    • Table: incident
    • type: Reference
    • Column Label: toys
    • Column name: u_toys
    • Display: true
    • Reference: toys
    • Choice: Dropdown with -- None --
    • attributes: ref_ac_order_by=u_order
  5. Go to incident.do.
  6. Click toys dropdown.
    The sort is alphabetically no matter what you do to the order.

Workaround

Use the attribute [ref_sequence] instead of [ref_ac_order_by].

Replace:

ref_ac_order_by=u_order


With:

ref_sequence=u_order


Related Problem: PRB590252

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

  • toys_table_example.png
  • browser-firefox_not-sorting-by-order.png

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.