Export to CSV of empty query fails

OS info

Problem description

The server-side facility to export the result of a query as a CSV file makes the server action fail if the query is empty.

I’m not sure if this is a bug or my misplaced expectation.

The result I expect when the result of the query is empty is a CSV file created with just the header, not an outright abort of the server action.

Steps to reproduce

  1. Create a query
  2. Create a CSV export based on that query
  3. If the query produces a record set, the CSV file is created
  4. Modfy the query putting a condition that you know will produce no result set
  5. If the query produces no records as a result, the server action aborts
Community Page
Last updated: