Exporting a CSV file on submission
In order to use the Export as File action, you'll need to create a template, which tells XFP how to convert information from the form into a CSV file.
To do this:
Navigate to Templates in the top navigation bar (under the form title).
Click Create Template.
A popover will open, asking which type of action we want to create a template for. Choose Export as File under the File Output section, and click Next.
We'll then be taken to the template builder for this action.
It is also possible to access the template builder from within a rule, by choosing Create new... when selecting a template in a Then block.
Set the title of your template, and click Next.
Choose CSV as the type of file to export, and edit the settings if necessary. The settings available are:
- CSV Header: If checked, the CSV file will contain the field names above relevant columns within the first row of the data file.
- Field Terminator: A single character used to separate fields. Defaults to comma (,).
- Line Terminator: Choose a line ending type, from Windows (\r\n), Linux (\n) and OSX (\r). Defaults to use the Windows option.
Once you've set up these fields, click Next.
Choose the fields to include in your file. You can either choose all fields, or custom. Choosing custom will allow you to select exactly the fields you want to include. It is possible to include question answers, standard form data e.g. Form Title, and the value of logic formulae.
Tip: To include most fields, click Select All and then uncheck any you do not want to export.
Once you've selected each field you want to Export, click Next.
Choose a connector to use to transmit the exported file, or create a new one.
Click Save to create the template.
To make this action fire when your form is filled in, you will need to add it to a rule - see Building a Rule.