Sorting Options in Export Functionality

Currently, when performing exports, users can select fields from the same model or related models to include in the export.

However, I believe it would be beneficial to enhance the export functionality by allowing users to define sorting criteria. Specifically, users could have the option to sort the exported data by one or multiple fields of their choosing. This would make the exported datasets more organized and tailored to specific needs, improving usability and efficiency.

The export API is based on the list of ids that the client send to the server.
So supporting a configured order would mean either:

  • having the client refresh the content with the configured order which will loose the existing order but also modify it if the list was ordered by a sequence
  • having the server perform a search to order the ids which may be not possible depending on the size of the list (eg: SELECT id FROM table where id IN (1, 2, ...) ORDER BY column).

So for me this is not an improvement of the user experience as he will not get what is displayed or have unrequest changes.

Also I think that if the order for an export is important and that this export is frequently used, it should probably be an integration with a defined API.

And finally of course it will be great to have the possibilities on the clients to sort by multiple column but someone has to come with a nice and simple design for it.