In this article
If you have selected the Format to be Triple-S (refer to the Data Processing documentation for more information), then the dialog that opens will be as below:
Note: Two Triple-S export formats are available; Forsta Extended and Standard. The export formats are similar in all respects except that the standard format does not export Forsta extensions.
Figure 1 - The second stage of the Export dialog for a Triple-S XML file export
- Make the appropriate selections. The options are as follows:
- 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.
- Position of Loop Variables - 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.
- Triple-S Version - the Triple-S XML standard currently has three versions. Refer to the Data Processing documentation for more information.
- Triple-S Format - different versions allow different formats to be used. All three versions support "Fixed width", only version 2.0 supports "Comma-separated variables".
- Multi Question Format - data for Multiples may be recorded as either one character per value in Bitstring format, or as a list of values in spread format. Refer to the Data Processing documentation for more information.
- Bitstring format - data is recorded with one character per category of the corresponding variable. A character ‘1’ is used to signify that a category has been selected, a character ‘0’ signifies that a category is not selected. The category value refers to the relative position of the 0/1 code in the data field, thus a category value of 9 will always refer to the code in the 9th location of the data field even if some lower category values have not been defined.
- Spread - data is recorded as a series of sub-fields, each containing one category value of the variable. The category value is recorded as an integer number as described in the <values> element. The number 0 must be used to represent sub-fields that are not needed. The data sub-field length is the minimum number of characters required to represent the largest value in the values block. Thus variables with values up to 9 have a data sub-field one character long, variables with values up to 99 have a data sub-field length of 2, and so on. If any particular data value requires less than the maximum for the sub-field, it must be right justified using leading space or zero characters as padding. Data values may be stored in any or all sub-fields.
- 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 will take significantly longer to execute.
- Files to include - select which files are to be included in the export; Schema and data, Schema only, or Data only.
- Data File Encoding - to support the export of open text answers in surveys using Unicode (for example Chinese), you can choose the Character Encoding of the Export files. Choose between ANSI (default), Unicode or UTF-8 character encoding. This property defines the encoding for the data file.
- Schema File Encoding - to support the export of open text answers in surveys using Unicode (for example Chinese), you can choose the Character Encoding of the Export files. Choose between ANSI, Unicode or UTF-8 character encoding (default). This property defines the encoding for the schema file.
- Data Only, no schema - a Triple-S export will normally comprise two files; the data file and the schema file. However if for example you are performing a recurring task, you may not need to export the schema every time. Check this box if you wish to export only the data file.
- Recode Multis - check this box to recode value codes for non-sequential multi variables. For example, a multi variable with the answer codes 1, 2, and 99 will normally use 99 positions in the export, although only three are actually required. Check the box to recode the variables such that they will have the value codes 1, 2 and 3. The variable will then use only three positions. If you have many multi variables with non sequential codes, selecting Recode Multis will greatly reduce the size of the exported file.
- 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.
- Text in Labels - when the Variables to include (Survey Data Template) option above is selected, the Text in Labels option becomes available. Here you can select whether you wish to export the column labels from the template or from the survey (the labels can be modified in the template - see the Data Processing documentation for further details).
- Exclude Hierarchy / Table Lookup Labels - check to exclude labels from the export.
- 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: The '_^PROJECTID^_' part of the name will be replaced by the real survey id during rule execution. 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.
Authoring Tags
Authoring accepts numbers, letters and underscore (_) in codes on Multi questions, but the Triple-S multiple variable type only accepts numeric codes. On Multi questions with non-numeric characters in the codes, the codes will be recoded into numeric characters for the Triple-S codes in the answer list (both in schema and data).
Note: If you only ever use numeric codes in Multi questions, you will avoid this issue.
However, when moving data between surveys, or out of Authoring for external changes and then back in to a Forsta survey again, the link to the original codes in the Forsta survey must be retained. Forsta has therefore made an extension to Triple-S. A multiple variable with non-numeric codes will then look as follows in the schema (template) file:
<variable ident="1" type="multiple">
<name>q1</name>
<label>Car brands</label>
<position start="100" finish="105" />
<values>
<value code="1" confirmit:code="a">Ford</value>
<value code="2" confirmit:code="b">Chrysler</value>
<value code="3" confirmit:code="c">Volvo</value>
<value code="4" confirmit:code="d">BMW</value>
<value code="5" confirmit:code="e">Honda</value>
<value code="6" confirmit:code="f">Toyota</value>
</values>
</variable>
When exporting the template, you may choose not to include these Confirmit tags in the file in case it causes issues for some importers. To do this, check the Exclude Confirmit tags box when exporting a template.