Sorting results by field value
Learn how to sort your View entries by any field—text, numbers, dates, or randomly.
1. Edit the View you want to sort
On the All Views page, click on the View you wish to sort.

2. Find the Filter & Sort tab in the Settings box
Scroll down below the View editor. You'll see a Settings box with multiple tabs. Click the Filter & Sort tab.
If you can't see the Settings box, it may be hidden; here's how to show it.
3. Choose what field to sort by
Select the field you want to use for sorting. GravityView handles different field types automatically:
- Text fields (Name, Address, etc.): Sorted alphabetically
- Number fields (Quantity, Price, etc.): Sorted by numeric value
- Date fields (Date Created, Custom Date, etc.): Sorted chronologically
- Entry ID: Sorted chronologically
4. Choose the sort direction
| Direction | Text Fields | Number Fields | Date Fields |
|---|---|---|---|
| ASC (Ascending) | A → Z | 1 → 100 | Oldest → Newest |
| DESC (Descending) | Z → A | 100 → 1 | Newest → Oldest |
| Random | Random order | Random order | Random order |
5. (Optional) Add secondary sorting
If you need to sort by a second field when entries have the same value in the primary field, use the secondary sort settings. The secondary field acts as a tiebreaker when multiple entries have the same value in the primary field.
- Sort by secondary field: Select the field to use as a tiebreaker
- Secondary sort direction: Choose ASC, DESC, or Random
Example: Sort a directory by Last Name (primary), then by First Name (secondary) so that "Smith, Alice" appears before "Smith, Bob".
6. Save the View
Click Update to save your sorting settings.
Troubleshooting
Random sorting not working?
Some managed WordPress hosts (including WP Engine, Kinsta, and Flywheel) disable the ORDER BY RAND() MySQL function for performance reasons.
Solutions:
- Enable random sorting on WP Engine
- Contact your host's support to ask about enabling
ORDER BY RAND()
Dates not sorting correctly?
Make sure your date field uses a consistent format. If dates are stored as text (rather than a Date field type in Gravity Forms), they may sort alphabetically instead of chronologically.