ConfiForms provides a way to export data in 4 different formats (or in 6 if you count flattened views as separate types)
- CSV (+flattened view) - comma separated values
- XLS (+flattened view) - Microsoft Excel format
- JSON - JSON format
- XML - dataset exported in an XML format
First 2 are for end-users mainly and second 2 are for further data processing, as it depends how the data for complex fields is exported. JSON and XML formats export internal representation of the data, that means you will see IDs for dropdowns, GUIDs for smart classifiers, page IDs for pages and blogposts, date and time fields exported as timestamps (epoch) and also IDs for database-backed fields
Let's consider an example. Here is a form with 3 fields
- mytf - text fied
mydf - dropdown field (contains 3 choices)
ID LABEL 1 one 2 two 3 three
- mydate - is of type date
Export is enabled by default in the Admin UI for the form
We will add couple of records and will show how the exported result for each format look like
Exported as CSV
Exported as XLS
Exported as JSON
Exported as XML
In the examples above you can see the difference in how the data differs (for non-text fields, see "mydf" and "mydate" fields)
Form Admin UI also provides a way to see the structure of the form dataset, providing RAW data format.
This is mainly used for troubleshooting and data recovery
What about flattened views?
These are used for forms which have multi-select fields and you want to export each choices as aseparate row
Consider the following example
We have added one more field of type multi-select into the form (described above)
It is called "mymf" and of type "Multi-select"
We changed our dataset to
It still contains 2 fields and the exported view as CSV looks like this:
However, when "flattened view" is requisted it will split the choices of multi-select field into separate rows
See last 2 rows, they are practically identical with one exception, last field: each selection for multi-select field is on on it's own row
What if I need internal data in CSV/Excel format?
This is also possible, but will require a bit of custom work
Consider how the link to export data is constructed in form AdminUI (but also in other views where export is enabled)
|pageId||Page Id of the page where ConfiForms is configured|
form name and again page ID where form is defined (some backward compatibility parameter, but still is required). It sould be given in a format
In the example above we have a form named "f" and it is located on the page with id "8159450"
Field names to export. This is interesting, as you can limit the fields in your export and also use the techniques from Accessing field values and properties to customize the export.
to export just user-defined fields, without metadata fields
to export date field as timestamp in CSV format and dropdown field's ID (not label)
For fields, you can use Virtual functions and format or transform the values as needed!
|filter||Same as ConfiForms Filters. To limit the exported dataset|