Sample
A Sample question is used for inserting text strings from a field in an imported sample file into the survey. This allows the sample variable to be used in survey logic, and also makes the sample variable available in the data export.
Adding a Sample question
Section titled “Adding a Sample question”Here’s how to add a Sample question to the survey flowchart:
- Add a Sample object to the flowchart. In Survey Editor (Legacy), drag it from the Toolbox, or double-click it. In Survey Editor (Beta), drag the Sample card from the Add to survey toolbar, or click it to add it at the end
- Enter the sample field name — it MUST match the field in the sample file exactly:
- Survey Editor (Legacy): enter it into the Variable Name property
- Survey Editor (Beta): choose it in the Sample field dropdown in Quick Update or the Properties pane. The list shows the fields in the sample you’ve uploaded. If the field isn’t uploaded yet, type its name into Sample field name.
Appearance
Section titled “Appearance”Sample questions are typically hidden from survey participants. Once you’ve tested that the sample variable is being imported into the survey correctly, hide the question before launching the survey if you don’t want the participant to see the response being imported from the sample.
Question format
Section titled “Question format”Verbatim is the only Sample question format available.
Verbatim — Used to import text strings from the sample file into the survey.
Position in the flowchart
Section titled “Position in the flowchart”If a sample field will be used in the survey (e.g. for a skip, filter, action command, conditional text), the Sample object must be placed at the beginning of the survey, prior to any questions that reference the sample field.
If there are a large number of sample fields to be imported into the survey, consider placing the Sample objects that aren’t needed for scripting purposes at the very end of the survey. Too many hidden Sample objects at the start of the survey may slow the page loading time and have a negative impact on user experience.
Data structure
Section titled “Data structure”For each Sample question, you’ll find one text variable in your dataset.
| Question Format | Variable Type | Example Response |
|---|---|---|
| Verbatim | Text | Postcode = 2350 |
Use Sample question in survey
Section titled “Use Sample question in survey”Sample question responses can be used in skips, filters, action commands, and conditional text throughout a survey. A Sample question functions in the same way as a Verbatim.