Help Center / Variable / Variables

Variables

Variables

Advantages of Variables

Enhancing Questionnaire Flexibility
  • Smarter Skip Logic: Dynamically adjust subsequent questions based on respondents' answers, avoiding irrelevant questions and improving survey efficiency.
  • Personalized Questions: Customize questions based on respondent information (e.g., name, region) to increase engagement and relevance.
  • Dynamic Options: Adjust answer choices based on previous responses, ensuring the suitability of options.
Improving Data Quality
  • Reducing Errors: Avoid inaccuracies caused by irrelevant answers or inappropriate options through skip logic and dynamic choices.
  • Increasing Completion Rates: Personalized questionnaires encourage respondents to complete the survey, reducing drop-off rates.
  • More Accurate Data: Dynamic adjustments ensure the collected data aligns more closely with research objectives.
Simplifying Questionnaire Design
  • Reducing Repetitive Questions: Avoid redundant questions by referencing variables, shortening the questionnaire length.
  • Clearer Logic: Variable functionality makes complex logic easier to implement, improving design efficiency.
  • Template Design: Save commonly used variables as templates for easy reuse in future questionnaires.
Strengthening Data Analysis Capabilities
  • Data Correlation Analysis: Track response paths through variables, enabling deeper analysis of relationships between different answers.
  • Segmented Audience Analysis: Classify respondents based on variables for more detailed group analysis.
  • Data Visualization: Generate charts and graphs using variables to present data more intuitively.
Other Advantages
  • Multilingual Support: Dynamically switch questionnaire language based on respondents' preferences.
  • A/B Testing: Implement different versions of questionnaires using variables for comparative testing.
  • Enhancing User Experience: Personalized questionnaires make respondents feel valued, increasing their engagement.

Basic Concepts of Variables

Categorize Variables by Type

Create a Variable

String Variable

Numeric Variable

Numeric Operators

Boolean Variable

  • If it is an empty string, it will be converted to "false."
  • If it is 0, it will be converted to "false."
  • Otherwise, it will be converted to "true."

Media Variable

API Request Variable

HTML Variable

HTML Placeholder
Global Mode

Categorize Variables by Characteristics

Explicit Variable

Implicit Variable

Commonly Extracted Implicit Variables from Nodes

  • Question Name: The name of the target Question.
  • Question Runtime ID: The dynamic number of the target question during runtime;
  • Question Text: The question text of the target Question.
  • Question Description: The Question description of the target Question.
  • Time Spent: The time taken by the respondent to answer the target question, measured in milliseconds.
  • Result: The response content provided by the respondent for the target question.
  • Time taken is too long: A boolean variable indicating whether the respondent took longer to answer the target question than the time specified in the Response Time Validation Settings.
  • Time taken is insufficient: A boolean variable indicating whether the respondent took less time to answer the target question than the time specified in the Response Time Validation Settings.
  • Question Image: The image associated with the target Question.
  • Custom Validation Failed: A boolean variable indicating whether the respondent's answer to the target question failed the custom validation.
  • Custom Validation Failure Count: The number of times the respondent's answer to the target question failed the custom validation.
  • Question Label: The label of the target Question.
  • Phone Number: The phone number entered by the respondent in the target validation node, available only for validation nodes.
  • Password/Verification Code: The password or verification code entered by the respondent in the target validation node, available only for validation nodes.
  • Phone Number Already Used: A boolean variable indicating whether the phone number entered by the respondent in the target validation node has been used before in a previous response to the questionnaire, available only for validation nodes.
Common Variable Groups Extracted from Nodes
  • All Options: Extract subsequent variables based on all options of the target question.
  • Specified Option: Extract subsequent variables based on a specified option. You can specify other options here.
Variables unique to Choice question
  • Selected Options: Extract subsequent variables based on the selected options of the target question.
  • Unselected Options: Extract subsequent variables based on the unselected options of the target question.
Variables unique to Rating Scale question
  • Rated Options: Extract subsequent variables based on the rated options of the target question.
  • Unrated Options: Extract subsequent variables based on the unrated options of the target question.
Variables unique to Input Text question
  • Entered Options: Extract subsequent variables based on the entered options of the target question.
  • Unentered Options: Extract subsequent variables based on the unentered options of the target question.
Variables unique to Ranking question
  • Sorted Options: Extract subsequent variables based on the sorted options of the target question.
  • Unsorted Options: Extract subsequent variables based on the unsorted options of the target question.
Variables unique to Location Detection question
  • Matched Options: Extract subsequent variables based on the matched (or selected) options of the target question. This applies only to location-based questions, where matching essentially means selection.
  • Unmatched Options: Extract subsequent variables based on the unmatched options of the target question. This applies only to location-based questions.
  • Location: Applies only to questions that contain location information. The coordinates, country, province, city, and district/county within it have the same meaning as in the system variables;
  • Positioning Failed: A boolean variable indicating that the target node location failed.
  • Positioning Successful: A boolean variable indicating that the target node location succeeded.
  • Positioning failed and skipping is Allowed: A boolean variable indicating that the referenced location node did not obtain valid location information (True).
Common Variables Extractable After Selecting a Question
  • Option Text: The text of the target option.
  • Option Number: The number assigned to the target option.
  • Option Score: The score value of the target option.
  • Input Value: The content entered for the target option.
  • Option Group Name: The name of the group to which the target option belongs;
  • Number of Options: The number of options that meet the conditions specified by the previous variable group.
  • Option Image: The image associated with the target option.
  • Option Label: The label associated with the target option.
  • Option Selected: Returns True if any option is selected in the target question, apart from other options;
  • Addtional input content for options: Respondents input additional content in the options;
Variables unique to Rating Scale, Slider Scale, Continuous Scale and Point Allocation
  • Same Score: Returns True if the scores of the target options are the same;
  • Different Score: Returns True if the scores of the target options are different;
Variables unique to Text Input
  • Same Input Value: Returns True if the input values of the target options are the same;
  • Different Input Value: Returns True if the input values of the target options are different;
Variables unique to Ranking
  • Option Sort Order:The sorted index number of the option after sorting.
Implicit Reference Data Transfer
Loop Variables
  • They can be referenced within the loop process to access the running status of previous iterations of the loop up to the current one.
  • They can be referenced after the loop process to access the running status of all iterations of the loop.

System Variables

Date
Basic
  • Questionnaire ID: The unique identifier of the current questionnaire.
  • Respondent ID: The WeChat ID of the respondent, which requires WeChat authorization to be set up in the questionnaire. It cannot be resolved in preview mode.
  • Respondent Union ID: The union ID of the respondent's WeChat account, which also requires WeChat authorization. It cannot be resolved in preview mode.
  • Respondent Nickname: The nickname of the respondent's WeChat account, which requires WeChat authorization. It cannot be resolved in preview mode.
  • Respondent Source: Get the application information used by the respondent to open the questionnaire. If the respondent opens the questionnaire in WeChat, it will return "WeChat"; if the respondent opens it in a browser, it will return "Web".
  • Response ID: A unique ID generated when the respondent downloads the questionnaire. It cannot be resolved in preview mode.
  • Collector Code: The code of the collector used to publish the questionnaire. It cannot be resolved in preview mode.
  • Collector Name: The name of the collector used to publish the questionnaire. It cannot be resolved in preview mode.
  • Start Time: The time when the respondent began answering the questionnaire.
  • Time Spent: The time taken by the respondent to complete the questionnaire.
  • Result: All answers provided by the respondent up to the current progress.
  • Current Language: The current language of the questionnaire.
  • Link Type: Return the type of link for the current questionnaire, either a formal or a preview link.
Location
  • Coordinates: The latitude and longitude code of the location point.
  • Country: The country where the location point is situated.
  • Province: The province where the location point is situated.
  • City: The city where the location point is situated.
  • District/County: The district or county where the location point is situated.
Context
Device
  • OS Name
  • OS Version
  • Browser Name
  • Browser Version
  • Device Vendor
  • Device Model
  • Device Type
Language
URL Parameters