How do I export data, say in a CSV file, with column names so I can easily import that data elsewhere?
Format the date on the layout (via Inspector). Then in the Export dialog, check the box "Apply current layout's data formatting to exported data".
Sun. May 15 9:30 AM
(if that's your datetime formatting on the layout) will be the format in the export, not
the actual value of the field.
Numbers, dates, times and datetimes use this formatting. Unfortunately, text formatting is lost.
For exporting data in a csv, we usually put the data in one single field that contains all of the data, separated by comma
When possible, we create a virtual list with that data, an extra first line with the header (column names) will be created as first record in that virtual list (for exporting/LineEndings reasons, we create a helper table, not just a script-variable). The virtual list need one single field with all the data (separatd by comma))
If no 'virtual list' is possible, we create an extra field that contains all the data, separated by comma. There, we have to create an extra record with the header (column names...) that goes out first (sorting..)
(there are examples of XSLT that does the export as well)
excellent alternatives, Markus!
Since there may be errors with XML/XSLT (Windows only - see this forum for Product Issues), it may be more beneficial to use the (one field per "row" in a temporary table) and script setting the header and each "comma-separated" list of column data (one row per record). Then export as Tab-delimited (yes!) this one field (all records). The end-of-line will be correct.
Since I'm in the process of migrating all my data out of FMP and moving off the platform, I decided to just use JDBC. Then I can migrate all the container fields easily too.
Yes! another option!
Retrieving data ...