Automatically select sortOrder based on sort field.