In Salesforce, list views may not sort in the order you expect. This most often occurs when sorting using text fields that contain numerical values, or when sorting picklist fields that include inactive values. This behavior also applies when using the "Set by multiple columns" sort feature.
Example:
Issue: Suite 1804 should sort after Suite 203, but instead appears before it in the list view. Additionally, encrypted fields cannot be sorted in a list view.
List views in Salesforce sort text fields character-by-character rather than numerically, which can cause unexpected ordering. For example: 2080 Century Park East, Suite # 1804 comes before 2080 Century Park East, Suite # 203 because it sees that the "1" in "1804" comes before the "2" in "203". It does not evaluate "1804" as a whole number. To get correct numerical sorting, use Number field types instead of Text fields. For picklist fields, inactive values must be alphabetized alongside active values to sort correctly.
If the sorting field is a text field containing numbers:
The recommended workaround is to store numerical values in fields of type Number instead of Text. When a Number field is sorted, Salesforce evaluates the value as a whole number. In this case, "203" correctly appears before "1804".
If the sorting field is a picklist:
Inactive picklist values may be causing unexpected sort behavior. To fix this:
The sort will now work with both inactive and active values in your list view.
000385188

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.