In this article
If you have selected the Forma to be Delimited Text File or Delimited Text File (Answer Codes as Labels), then the dialog that opens will be as below.
Figure 1 - The second stage of the Export dialog for a Delimited Text File export
- Make the appropriate selections. The options are as follows:
- Formatting - a delimiter is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data stream. An example of a delimiter is the comma character in a sequence of comma-separated values. Select the delimiter that you wish to be used in the data file to be exported. The options are:
- Comma - a Comma (,) -separated ASCII text file is generated. All answers will be inside quotes (""). The variable names will be in the first row.
- Tab - a Tab-separated ASCII text file is generated. No quotes ("") are used. The variable names will be in the first row.
- Custom - the Custom Delimiter field is activated. Here you can select any single keyboard character, which will then be used as the delimiter in the exported ASCII text file.
- Text qualifier - this property is available when you select “Formatting: Comma separated” or "With Quotes". When "Comma separated" is selected, the comma character has a special meaning; it is used to separate the different values from the different variables. However during export commas will be removed from opentext answers since in this case the character has a different meaning. Adding quotes around an answer text ensures that the text remains unchanged. A Delimited Text File export with Quotes can be generated.
- Locale - determines the formatting of elements such as numbers (decimal point) and dates/times. Select the locale appropriate to the format used in the file.
- Include Uploaded Media Files - when selected, images captured as image upload question types will be included in the generated exported file. This option is only available for delimited file exports. The image file name is a JPEG with the same name as that stored in the data record for that question (go to Image Upload Object for more information). In the event a large number of images are to be exported, FTP delivery should be used.
- Media File Naming - When media files are included, this property will determine the naming of the media files. The options are:
- Detailed (default) - projectID_respID_loopIDs_questionID_uniqueID.extension
- Unique - uniqueID.extension
- Truncate Open Ends - For Open Ends (Open Text questions with no field width specified), it is recommended to truncate texts to improve performance. If a number of characters is specified for the Open Ends Width, texts longer than this limit, if any, will automatically be truncated. If No Truncation (Full Length) is selected, the whole text will be imported/exported, but the task may take significantly longer to execute.
- Open End Handling - defines how open ended questions are handled. The options are:
- Include Open Ends - all open end questions are included in the export.
- Exclude Open Ends - no open end questions are included in the export.
- Open Ends Only (one row per respondent) - only open end questions are included in the export file, with one row in the file for each respondent (all the answers for each respondent are in the same row).
- Open Ends Only (one row per answer) - only open end questions are included in the export file, with one row in the file for each answer given.
- File Encoding - to support the export of surveys using Unicode (for example Chinese), you can choose the Character Encoding of the Export files. Choose between ANSI, Unicode and UTF-8 (default).
- Loop Handling - this option is only available if the survey included loops. Here you specify how loops are to be handled for the export. The options are:
- Separate files - the default export format for loops creates one export file for each loop, and one export file for the top level. In the files containing the loop data there will be one row per loop iteration per respondent, so there will be several rows for each respondent. Each row will have the responseid (system generated respondent id) of the respondent and the precode of the loop id for the iteration as identifiers, and then the answers for the questions inside the loop for that specific iteration for that respondent. This means you can export a hierarchical survey without having to generate a flattened template.
- Single file - Instead of exporting loop data as separate files, you can export all data belonging to a survey in one single file. Loop data will then be expanded. This means that variables will be created to represent each iteration of each question.
- Loop Position - only available when Single file is selected in the Loop Handling option. This allows the user to specify in which position the loop variables should be exported. The options are:
- As in Survey - the loop variables are positioned as the corresponding loop was placed in the Survey.
- Appended at end - the loop variables are appended at the end of the template.
- Variables to Include... - You can build templates to choose a subset of data fields for your exports. Check the box, then select the template you wish to use.
- Override Filename - allows you to override the system-generated file name. Tick this checkbox to open the file name text-box . Here you can edit the system-generated name (go to APPENDIX F: EXPORT FILENAME DYNAMIC VALUES for more information). Note that when exporting Survey Data to the FTP server in Survey Data > Exports or Data Processing rules, the Override Filename option accepts relative paths, as for example “..\..\myftpfile_in_another_folder.txt”. In this case the file will not be stored in the default folder (“ProjectsData\p123123” or “RulesData\RuleN”), but rather directly under the (Company) Download folder.
- Export language - in the event the survey is multi-lingual, select the survey language version to be exported.
- Text in Question Labels - select the text you wish to be included as the question labels. The options are:
- Text only - the label element will contain the question id followed by the text of the question, separated by a colon.
- Title only - the label element will contain the question id followed by the title of the question, separated by a colon.
- Title and Text - the label element will contain the question id followed by a colon, then the question title followed by the question text, these separated by a hyphen.
- Question ID - the label element will contain only the question id.
- Text in Answer Element Labels - allows you to specify whether the Answer element of a Multi / Grid / Open Text List / Numeric List Question is to be positioned in front of the Question label, after the Question label or without the Question label when exporting survey data or when generating a Survey Data Template which can be used for a survey data export. The content of the Question label depends on the Text in Question Labels setting, which allows you to specify whether you want the Question ID, Question text, Question title or Question text and Title exported. Select the text you wish to be included as the answer labels. The options are:
- Answer (Question Label) - the question label is placed after the answer element.
- Question Label (Answer) - the question label is placed before the answer element.
- Answer - the answer element is placed without the question label.
- When you have made the appropriate selections, click Next to go to the third stage of the dialog.
Note: There is no filter for Open End type, so all Open Text questions with no field width specified will be included in the export (those with type Normal, Hidden or Background), while those with field width set will not be included.
Note: The '_^PROJECTID^_' part of the name will be replaced by the real survey id during the export. Default is ^PROJECTID^_^USERID^_^TASKID^ (if Date Filter is used, then ^START^ and ^END^ will also be included). ^PROJECTID^ is only "required" when executing a rule; it is not "required" when running an export using the Export GUI.
Note: As the engine that is used for the exports requires that the column titles are unique, and in Professional Authoring question titles can be the same on different questions, the question id is included first for all question label options.