Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Auibutton
category
externalUrlhttps://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/import-and-export-surveys/#PreparingAnAdvancedFormatTXTFile
fullWidthfalse
color#00A9B7
shaperounded
filterSpacefalsedestinationexternalUrl
iconatlaskit-ShortcutIcon
destinationexternalUrl
textColorPaletteDefault
preset
typelink
titleSource: Qualtrics AdvancedFormat TXT Documentation
textColor#F4F5F6
targettrue
selectedUrlhttps://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/import-and-export-surveys/#PreparingAnAdvancedFormatTXTFile
an.spaceKeyhealthyhorns
sizemedium
iconPositionbefore
id5sbzdmeyfbs
category
alignmentleft
backgroundColorPalettecfm-organization-colors-utexas Secondary Color Palette

Overview

Advanced Format TXT files in Qualtrics are used primarily for importing survey structures, such as questions, choices, and basic configurations. They provide an efficient way to structure and import surveys, especially for those who prefer working with raw code or need to create surveys in bulk. Whereas the format supports a wide range of question types and settings, it is important to note that advanced logic (e.g., skip patterns or display logic) must still be added post-import in the Qualtrics platform.

  • Purpose of Advanced TXT Format:

    • It’s used to define the core structure of a survey, including question text, types, answer choices, and basic settings.

    • While highly flexible for survey design, it doesn’t support direct inclusion of advanced logic like skip patterns or branching.

  • Implementation of Advanced Logic:

    • After importing the TXT file into Qualtrics, you can use the Survey Flow and other tools in the Qualtrics platform to add branching, randomization, and display logic.

    • Example: Adding a branch to show Question 3 only if Question 2's answer equals "Yes" must be configured post-import.

  • Syntax in Advanced TXT:

    • Each question component is explicitly defined with [[...]] tags.

    • Tags are tightly formatted (no spaces inside [[ and ]]).

    • Tags follow a hierarchical structure:

      • Question definition ([[Question:Type]])

      • Choices ([[Choices]])

      • Settings (e.g., [[Required]], [[TextValidation]])

Specifying Types Within Tags:

When defining a question or other survey component, the type is specified directly in the tag. Each type is crucial for ensuring the correct functionality and layout of the survey question. Mislabeling a type may result in errors or unexpected behavior when importing into Qualtrics. For example:

  • [[Question:MC]] indicates a multiple-choice question.

  • [[Question:TE]] indicates a text-entry question.

  • [[Question:Matrix]] specifies a matrix-style question.

Tags with Multiple Types

Some question types in the Advanced TXT format allow for more flexibility and customization through the use of sub-types. By appending labels after the main tag (separated by colons), you can adjust the question’s layout, behavior, and options.

Examples of Multi-Type Tags:

  1. [[Question:MC:MultipleAnswer]]

    • A multiple-choice question allowing multiple selections.

    • Default is [[Question:MC]], which allows a single answer unless :MultipleAnswer is added.

    • Code Block
      [[Question:MC:MultipleAnswer]]
      Select all the fruits you like:
      [[Choices]]
      Apple
      Banana
      Cherry
  2. [[Question:Matrix:Likert]]

    • A Likert-style matrix question, ideal for rating scales.

    • Adds Likert functionality to a matrix question.

    • Code Block
      [[Question:Matrix:Likert]]
      Rate your satisfaction with the following:
      [[Choices]]
      Very Dissatisfied
      Dissatisfied
      Neutral
      Satisfied
      Very Satisfied
      [[Statements]]
      Customer Support
      Product Quality
      Delivery Speed
  3. [[Question:TE:Essay]]

    • A text-entry essay question for longer, open-ended responses.

    • The default [[Question:TE]] is a single-line input, while :Essay allows for a larger text box.

    • Code Block
      [[Question:TE:Essay]]
      Please describe your experience with our service:
      [[Required]]

Other Common Multi-Type Tags:

  • [[Question:MC:Dropdown]]: Converts a multiple-choice question into a dropdown menu.

  • [[Question:TE:Form]]: Creates a form-style question for collecting structured data (e.g., Name, Email, etc.).

  • [[Question:Matrix:Bipolar]]: Sets up a bipolar matrix for comparisons between two opposing attributes.

Combining Multi-Type Tags with Other Features

You can pair these multi-type tags with settings like [[Required]], [[RandomizeChoices]], or [[TextValidation]] for additional customization.

Example:

Code Block
languagenone
[[Question:MC:MultipleAnswer]]
Select all the colors you like:
[[Choices]]
Red
Blue
Green
Yellow
[[RandomizeChoices]]
[[Required]]

Question Type Codes

The following is a list of question types compatible with Advanced TXT formatted files. Each type is defined by specific tags, and optional sub-types can further customize the question format.

Multiple Choice Questions

Tags: [[MC]] or [[MultipleChoice]]

Sub-types:

  • [[SingleAnswer]]: A single-answer question (default).

  • [[MultipleAnswer]]: A multiple-answer question.

    • [[Vertical]]: Displays answer choices in a vertical layout.

    • [[Horizontal]]: Displays answer choices in a horizontal layout.

    • [[DropDown]]: Displays answer choices in a dropdown list.

    • [[Select]]: Displays answer choices in a select box.

    • [[MultiSelect]]: Displays multiple-answer options in a select box.

...

Matrix Table Questions

Tags: [[Matrix]]

Sub-types:

  • [[SingleAnswer]]: Respondents can select one answer per row.

  • [[MultipleAnswer]]: Respondents can select multiple answers per row.

...

Text Entry Questions

Tags: [[TextEntry]] or [[TE]]

Text entry questions can also be created by including 2+ consecutive underscores in the question text or by using the phrases “open text” or “open end.”

Sub-types:

  • [[SingleLine]]: Single-line text input.

  • [[Essay]]: Large text box for extended responses.

  • [[Form]]: Creates a form-style question for structured data (e.g., Name, Email).

...

Other Question Types

  • Constant Sum Questions: [[ConstantSum]] or [[CS]]
    Respondents distribute a constant value across multiple items.

  • Rank Order Questions: [[RankOrder]] or [[RO]]
    Respondents rank options in order of preference.

  • Text/Graphic Questions: [[Text]] or [[DB]]
    Used to display descriptive text or images without collecting responses.

...

Text Validation

The [[TextValidation]] tag allows you to enforce specific input criteria for text entry questions. Text validation helps to ensure that respondents input data in a specific format, reducing the likelihood of errors and ensuring data consistency. This feature is particularly useful for questions like phone numbers, email addresses, or dates. The type is defined after the tag using a colon (e.g., [[TextValidation:Numeric]]).

Common Validation Types:

  • Numeric: Ensures the response is a number (e.g., 123, 45.67).

  • Email: Validates an email address (e.g., example@domain.com).

  • Date: Ensures the response is in a date format (e.g., MM/DD/YYYY).

  • Phone: Validates phone numbers (e.g., (123) 456-7890).

  • TextLength: Restricts input to a specific character range.
    Example: [[TextValidation:TextLength:10-50]] (10 to 50 characters).

  • CustomPattern: Enforces a regex pattern for custom formats.
    Example: [[TextValidation:CustomPattern:\d{4}-\d{2}-\d{2}]] (YYYY-MM-DD).

  • URL: Ensures the response is a valid URL (e.g., https://example.com).

Example:

Code Block
[[Question:TE:SingleLine]]
Enter your email address:
[[TextValidation:Email]]
[[Required]]

...

Other Tags

These tags are used to enhance the structure and functionality of surveys created with Advanced TXT files.

Survey-Level Tags

  • [[SimpleFormat]]: Declares a simple formatted file.

  • [[AdvancedFormat]]: Declares an advanced formatted file.

...

Question and Answer Tags

  • [[Question:{type}:{sub-type}:{sub-sub-type}]]: Defines a question and its type (e.g., MC, TE, Matrix). Optional sub-types add further customization.

  • [[Choices]]: Lists answer choices for multiple-choice or statements for matrix questions (one per line).

  • [[Answers]]: Specifies answer options for matrix questions.

  • [[AdvancedChoices]]: Allows advanced choice formatting (e.g., recode values).

    • [[Choice:{recode value}]]: Starts a choice with an optional recode value.

  • [[AdvancedAnswers]]: Allows advanced answer formatting for matrix questions.

    • [[Answer:{recode value}]]: Starts an answer with an optional recode value.

...

Question Settings Tags

  • [[Required]]: Marks a question as required.

  • [[MultipleAnswer]]: Marks a question as allowing multiple answers.

  • [[ID:{Question ID}]]: Assigns a unique ID to the question.

...

Survey Flow and Page Tags

  • [[ED:{field}:{value}]]: Adds embedded data to the survey flow with an optional value.

  • [[PageBreak]]: Inserts a page break between questions.

...

Block Tags

  • [[Block]]: Begins a new block of questions.

  • [[Block:{block name}]]: Starts a block with a specified name

...

Example of a Complete Question

Here’s how to define a multiple-answer question with randomization and a required response, followed by a single-line text entry question with numeric validation.

Code Block
[[AdvancedFormat]]
[[Block:Demographics]]
[[Question:MC:MultipleAnswer:Vertical]]
What are your favorite fruits? (Select all that apply)
[[Choices]]
Apple
Banana
Cherry
Orange
[[Required]]
[[RandomizeChoices]]

[[Question:TE:SingleLine]]
Enter your zip code:
[[TextValidation:Numeric]]
[[Required]]

...

Conclusion

The Advanced TXT format offers a powerful way to structure surveys in Qualtrics, allowing for flexibility in defining question types, layouts, and settings. While it doesn’t support advanced logic directly in the file, Qualtrics’ platform allows for easy addition of logic and flow customization after importing the survey. By mastering the use of tags and multi-type options, you can create complex and customized surveys efficiently.

...

Special thanks to Charles GPT for helping organize and refine this article.