How to Manage Lookup Values Sort Order

Document ID : KB000027087
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

My lookup does not sort properly when I use the 'pull-down' to display the values. I have configured the Default Sort Order to use the Lookup Code, but the list does not appear in that order.  How can I configure the lookup values to sort in the order desired?
 

Answer:

When you create a lookup or use a system-defined lookup, there are two methods to display your list of values for use in selecting a value from the lookup list of values.

When you navigate to a sub-page that has the lookup attribute, the user can select a lookup value from the list of values presented as a 'pull-down' list or as a 'browse' list with auto-suggest.

The 'pull-down' method will display the values in the attribute that is configured on the Lookup, Parent Window, Display Attribute field. The data is automatically sorted alphanumerically or by manual definition.  'Manual' sorting only applies to the order of the lookup values displayed for selecting a value on the attribute field.

The 'Browse Window' method will display a list view of the Lookup values based on the configuration of the Lookup, Browse Window options. This page allows the administrator to specify which attributes are to be displayed on the list and how to sort the values. This configuration does not apply to the pull-down display type.

The 'auto-suggest' method will display the values based on the auto-suggest configuration.

If you are looking at a List View that has a lookup attribute column, the saved values for that attribute column will behave in the same manner for sorting for all columns in a list view.  The sorting of columns on a list view uses the label value that is associated with that cell.  The default sorting value on a List View is configured on the list view layout.  If you are using an image for a column in the list view, you may not immediately see how the values may be sorted.  Look at the Lookup name value for the language you are using and when sorting the values in the list view, it is sorted based on that data.  Therefore you may see values sorted in a specific order in one language and then if you switch to another language, the values may be sorted differently based on the lookup name labels for the current language setting.

If you are trying to modify the sort order for a 'system-restricted' lookup, you may not have the option to make configuration changes to the way the values are sorted within the lookup definition.