Export to CSV Custom Ordering

0
I am using the ‘Export to CSV’ action. Inside the Export CSV, I have an IVK_RequestWriteCsv microflow. First, I retrieve the ExcelFile (main object) and then retrieve by association ExcelFile/RequestList. I then loop through and create a new RequestExport object for each Request object, and write the next line.   The logic works, but my problem is that it doesn’t export to CSV in the format I want. I want to export it based on my domain model order, or the order I created in RequestExport. Unfortunately, it exports in alphabetical order, starting from A to B columns. Can someone help me to order it?
asked
2 answers
0

Hi Selcuk,

The default behavior of ‘Export to CSV’ exports data in alphabetical order.

answered
0

Thank you for your input. Configuration

That was the solution that helped me actually. I did not read the documentation very well... Create a (non-persistent) entity that reflects your CSV structure (columns). The names of the attributes should be ordered alphabetical in respect to the CSV.

E.g. a CSV having the following contents: ID,Username,FirstName,LastName 1,jdoe,John,Doe

Could have an entity with the following attributes to maintain an alphabetical order:

  • C01_ID
  • C02_Username
  • C03_FirstName
  • C04_LastName
answered