Fetch files are used to populate a survey from an outside data source. Fetch files give you an excellent way to customize your survey for respondents if you know something about them ahead of time and want to use this information in the survey.
The steps to using Fetch files are as follows:
The Fetch File must be a CSV file and should be formatted as follows:

Each record in the file you are uploading has a password that matches the password used
in the survey. This password is the key that links the two records together.
Please note this helpful information regarding the format of the file:
To upload a Fetch file to SurveyWriter, do the following:
To pull data from the Fetch file, use the variable
insert function. In SurveyWriter, a variable is anything that is placed between two
horizontal bar characters ( | ).
To pull data from field A1, insert the variable |FETCH(A1)| into the
text of your survey. To locate the respondent data, the Fetch function uses the respondent
password and displays information from that row.
For example, if in Field A1 you have the item the respondent purchased, you might type the
following in the Question Text:
Last month you purchased |FETCH(A1)|. Please tell us how satisfied you were with this purchase.
Because of the flexibility of SurveyWriter, you can handle many advanced functions with a Fetch file. In the following example, a Fetch file is used to randomize text concepts too large to fit into a Sort Question.
Often in your surveys, you will insert text-based concepts into a Sort Function question to have them randomized and presented in a follow-up question. However, the maximum number of characters that the Sort Question can hold and display in the follow-up question is 500 characters. An easy solution to this limitation is to present your long text-based concepts as images. If this solution does not apply to you, you can use a Fetch file to pull all the text related to your concept from the Fetch file.
This example shows two types of questions. The first example shows how to display one random concept from five available concepts. The second example shows how to display five concepts in random order in a follow-up branching question. Both methods pull data from a Fetch file.
In SurveyWriter, Fetch files are used to pull in data from an outside data source. In this case, we are pulling text into the survey.
Fetch File
| A | B |
| password | a1 |
| 1 | <B>Concept #1</B><BR><BR>This product... |
| 2 | <B>Concept #2</B><BR><BR>This product... |
| 3 | <B>Concept #3</B><BR><BR>This product... |
| 4 | <B>Concept #4</B><BR><BR>This product... |
| 5 | <B>Concept #5</B><BR><BR>This product... |


The variable insert statement in this example, |FETCH(A1,Frandom)|, is composed of the following parts:
| Syntax | Explanation |
| | = |
Enclosing question IDs or Fetch statements in the bar characters indicates that we are dynamically inserting text from an outside source into the question. |
FETCH = |
Indicates that we are inserting data from a Fetch file. |
(A1,Frandom) =
|
A1 indicates that we are pulling data from column A1 in the Fetch file. Because we have included a question ID next to the column number, SurveyWriter substitutes the result from the question Frandom in place of a regular password to indicate the row from which to take data in A1. If the question Frandom returns a 3, data is pulled from the Fetch file from A1, Row 3 (in this example, Concept 3). |


Make the follow-up question a branching question with FSort as the branch parent. Select 5 as the number of branches and click the Last Branch Question to indicate that no additional branch questions follow this one.


The variable insert statement, \FETCH(A1,pw=|)\, is composed of the following parts:
| Syntax | Explanation |
\ \ = |
Enclosing question IDs or Fetch statements in the backslash characters indicates that we are dynamically inserting text from an outside source into a branching question that already contains the symbol |. |
FETCH = |
Indicates that we are inserting data from a Fetch file. |
(A1,pw=|) =
|
A1 indicates that we are
pulling data from column A1 in the Fetch file. |
In this example, SurveyWriter displays all five concepts from FSort in random order in the question text of the follow-up question.
Bulk Fetch is used to pull in multiple Response Codes simultaneously from a fetch file for use in the answer options of a single question. The format is as follows:
|FETCH(A1,BULK,Frandom)|
The syntax to store multiple variables in a single cell in your fetch file is:
1::Male~2::Female~3::No Answer
1:: = Answer Code
Male = Answer Label
~ = Separates answers