Metavariables Overview

This page lists all of the available metavariables, what they can do for you, and how to properly implement them into your surveys. Parts of each metavariable that can (or must) be changed to fit your survey are highlighted in red. The table below serves as a quick reference for when you need to find the format for a metavariable. Entries in the Starting Point column are presented for you to copy into your surveys and fill in the appropriate information.

Variable Function Starting Point
_OPENWIN300,500_ Open link in new window w/ height/width _OPENWIN#,#_
_ACT_CLICK_START_BUTTON_ Block functions as start button _ACT_CLICK_START_BUTTON_
_ACT_CLICK_CONTINUE_BUTTON_ Block functions as continue button _ACT_CLICK_CONTINUE_BUTTON_
_ACT_CLICK_BACK_BUTTON_ Block functions as back button _ACT_CLICK_BACK_BUTTON_
_ACT_CLICK_RESULTS_BUTTON_ Block functions as view results button _ACT_CLICK_RESULTS_BUTTON_
_USERID_ Replaced with viewer’s user ID _USERID_
_ANSWER1_ Replaced w/ answer text of question # _ANSWER#_
_Q1A1PCT_ Replaced w/ % users that chose answer _Q#A#PCT_
_questionRESPIMG#3_ Display answer image of answer from Q# _questionRESPIMG#_
_WEIGHTSUM1,2,3_ Sum of answer weights from Q#s _WEIGHTSUM#,#_
_WEIGHTSUMALL_ Sum of answer weights from all previous Qs _WEIGHTSUMALL_
_Q1CTF_Name1_ Custom variable from Q# w/ Name _Q#CTF_#NAME#_
_QCCTF_Name2_ Custom variable from this Q w/ Name _QCCTF_#NAME#_
_ACF_cf_Name3_ Custom variable from owning user w/ Name _ACF_cf_#NAME#_
_BLOCKDATA5123_ Displays text/image from block w/ block ID _BLOCKDATA#_
_BLOCKHREF5123_ Replaced w/ URL field of block w/ block ID _BLOCKHREF#_
_BLOCKHREFTARGET5123_ Replaced w/ target field of block w/ block ID _BLOCKHREFTARGET#_
[PIPETEXT] Replaced w/ text of answer chosen in selected Q [PIPETEXT]

Metavariables for Blocks Only

Variable: _OPENWIN300,500_
What it does: When used, causes a link to open a new window with the specified width and height.
Syntax: _OPENWINWidth,Height_
How to use it: In a block intended to be used as a link, enter it in the target field in the link address area.

Variables: _ACT_CLICK_START_BUTTON_
_ACT_CLICK_CONTINUE_BUTTON_
_ACT_CLICK_BACK_BUTTON_
_ACT_CLICK_RESULTS_BUTTON_
What it does: Causes clicking a block to function like clicking on the Start button, Continue button, Back button, or View Results button respectively.
Syntax: N/A
How to use it: In a block, enter it in the URL field in the link address area.

Metavariables for Blocks, Question Text, or Answer Text

Variable: _USERID_
What it does: _USERID_ is replaced by the viewer’s user ID, a number assigned by the Pinnion system.
Syntax: N/A
How to use it: Enter it in the question text field, an answer text field, or the text field of a block. _USERID_ can also be used in the URL field or any of the social block fields.

Variable: _ANSWER1_
What it does: _ANSWER1_ is replaced by the answer text of the answer chosen for the question number indicated. Supports open and single-select responses, but not multiple-select responses.
Syntax: _ANSWERQuestionNumber_
How to use it: Enter it in the question text field, an answer text field, or the text field of a block. _ANSWER1_ can also be used in the URL field or any of the social block fields.

Variable: _Q1A1PCT_
What it does: _Q1A1PCT_ is replaced by the percentage of users that chose the indicated answer on the indicated question.
Syntax: _QQuestionNumberAAnswerNumberPCT_
How to use it: Enter it in the question text field, an answer text field, or the text field of a block.

Variable: _questionRESPIMG#3_
What it does: Displays the answer image of the answer selected for the indicated question.
Syntax: _questionRESPIMGQuestionNumber_
How to use it: Enter it in the question text field, an answer text field, or the text field of a block. _questionRESPIMG#3_ can also be used in the URL field or any of the social block fields.

Variable: _WEIGHTSUM1,2,3_
What it does: Adds the answer weights of the answers chosen for the indicated questions, then displays the sum.
Syntax: _WEIGHTSUM1stQuestion,2ndQuestion,3rdQuestion,etc_ As many or as few questions as desired can be indicated, separated by commas.
How to use it: Enter it in the question text field, an answer text field, or the text field of a block. _WEIGHTSUM1,2,3_ can also be used in the URL field or any of the social block fields.

Variable: _WEIGHTSUMALL_
What it does: Adds the answer weights of all answers selected before the current question, then displays the sum.
Syntax: N/A
How to use it: Enter it in the question text field, an answer text field, or the text field of a block. _WEIGHTSUMALL_ can also be used in the URL field or any of the social block fields.

Variable: _Q1CTF_Name1_
What it does: Displays the custom variable with the designated name from the designated question.
Syntax: _QQuestionNumberCTF_VariableName_
How to use it: Make sure the variable you want to use is in the right question number and has the correct name. Then enter the metavariable in the question text field, an answer text field, or the text field of a block. _Q1CTF_Name1_ can also be used in the URL field or any of the social block fields.

Variable: _QCCTF_Name2_
What it does: Displays the custom variable with the designated name from the current question.
Syntax: _QCCTF_VariableName_
How to use it: Just like _Q1CTF_Name1_, except referencing the current question rather than a specific question. Enter the metavariable in the question text field, an answer text field, or the text field of a block. _QCCTF_Name2_ can also be used in the URL field or any of the social block fields.

Variable: _ACF_cf_Name3_
What it does: Displays the custom variable with the designated name assigned to the user that owns the survey (this is almost always the user that created it).
Syntax: _ACF_cf_VariableName_
How to use it: Just like _Q1CTF_Name1_, except referencing the user’s custom variables rather than a specific question. Enter the metavariable in the question text field, an answer text field, or the text field of a block. _ACF_cf_Name3_ can also be used in the URL field or any of the social block fields.

Variable: _BLOCKDATA5123_
What it does: Displays the text from a text block or the image from an image block with the indicated block ID.
Syntax: _BLOCKDATABlockID_
How to use it: Find the block ID from the block you want to display text or an image from. You can do this by hovering over the block with your mouse (but only after you’ve saved your survey since you created the block). Then enter the metavariable in the question text field, an answer text field, or the text field of a block. _BLOCKDATA5123_ can also be used in the URL field, the image override address of an image block, or any of the social block fields.

Variable: _BLOCKHREF5123_
What it does: Is replaced with the URL field from the block with the indicated block ID.
Syntax: _BLOCKHREFBlockID_
How to use it: Find the block ID from the block you want to copy the URL field from. You can do this by hovering over the block with your mouse (but only after you’ve saved your survey since you created the block). Then enter the metavariable in the question text field, an answer text field, or the text field of a block. _BLOCKHREF5123_ can also be used in the URL field or any of the social block fields.

Variable: _BLOCKHREFTARGET5123_
What it does: Is replaced with the target field from the block with the indicated block ID.
Syntax: _BLOCKHREFTARGETBlockID_
How to use it: Find the block ID from the block you want to copy the target field from. You can do this by hovering over the block with your mouse (but only after you’ve saved your survey since you created the block). Then enter the metavariable in the question text field, an answer text field, or the text field of a block. _BLOCKHREFTARGET5123_ can also be used in the target field, or any of the social block fields.

Metavariables for Question Text Only

Variable: [PIPETEXT]
What it does: When the “Pipe previous answer into this question” option is selected, [PIPETEXT] is replaced with the text of the answer chosen for the selected question.
Syntax: N/A
How to use it: Enter [PIPETEXT] into the question text field.