あなたも興味があるかもしれません...
Adding Custom Scoring / Logic type Question
Piping Text Over Multiple Pages - Example
Text Based Branching - Example
Randomization using Custom Scripting - Example
Branching from Multiple Select type questions
System Input Variables | Description |
---|---|
${responseID} | Unique Identifier for each response |
${custom1} | External Data Interface 1 |
${custom2} | External Data Interface 2 |
${custom3} | External Data Interface 3 |
${custom4} | External Data Interface 4 |
Dynamic Survey Variables | |
${<QUESTION_CODE>} | This is the response value for the question with the corresponding question code. |
${<QUESTION_CODE>_piping_text>} | If you have Piping_Text enabled typically used for branching, then the value of the piped text is assigned to this variable. |
Computed Variables | |
${score} | Computed score, also saved along with the results |
$survey.isDuplicateEntry("<QUESTION_CODE>", "test") | Assuming <QUESTION_CODE> is a text input question, isDuplicateEntry will return a true if any previous respondent has entered "test" |
$survey.extractAnswers("<QUESTION_CODE>", [1,2,3,4]) | Displays question extracted from <QUESTION_CODE> as if answer options 1, 2, 3 and 4 were selected. |
$survey.branchTo("<QUESTION_CODE>") | Branch to a Question based on Logic |
$survey.branchTo("<QUESTION_CODE>", "Piping Text") | Branch to a Question based on logic, and pipe the text into ${piping_text} |
$survey.branchTo("Thank_You_Page") | Branch to the Thank You page based on logic and the response is marked as completed. |
$survey.branchTo("Terminate_Page") | Branch to the Terminate page based on logic and the response is marked as terminated. |
$survey.sumValues() | Adds all the values for all analytical (multiple choice, matrix, rating etc.) questions. |
$survey.sumValues("<QUESTION_CODE>") | Adds all the values for the question code. |
survey.sumValuesWithPrefix(String prefixCode) | Adds all the values for all analytical (multiple choice) questions with a question code prefix. For example calling sumValuesWithPrefix("Q") will sum all the questions with question codes that start with a "Q" |
survey.questionCountWithPrefix(String prefixCode) | Counts the number of questions with that prefix code. This is meant to be used with the sumValuesWithPrefix -- This only accounts questions that have been answered and the question code starts with the prefix. |
$survey.computeAverage("<QUESTION_CODE>") | Computes the average values for the question code. |
$survey.chainTo(<survey_id>) | Chains to another survey |
Conjoint Variable Syntax | |
$CONJOINT.get(0) | Gets the Reference to the first attribute, replace 0 with 1 to get the second attribute etc. |
$CONJOINT.get(0).getLevelAt(0) | Gets the reference the first Level (within the first attribute) |
$CONJOINT.get(0).getLevelAt(0).getAverageUtility() | Gets the value for the utility score computed for that user/response - for the first level within the first attribute |
$CONJOINT.get(0).getRelativeImportance() | Gets the relative importance score for the first attribute |
Survey Logic/Branching Syntax | |
$survey.branchTo("Q10") | Branches to question with question code = Q10 |
$survey.chainTo(23451) | Branches to survey with ID = 23451 |
Analysis | |
$survey.getCustomScore(<QUESTION_CODE>) | Gets the "AVERAGE" value of the Custom Score for the question with the specific Code |
$survey.getCustomScore(<QUESTION_CODE>, <DATA_SEGMENT_CODE>) | Gets the "AVERAGE" value of the custom score for the question with the specificcCode for a particular data segment |
$survey.getResponseCount(<QUESTION_CODE>, <ANSWER_INDEX>, <RESPONSE_STATUS>) | Gets the number of respondents who have responded to the question identified with <QUESTION_CODE> with the answer identified with <ANSWER_INDEX> |
Charting | |
$survey.drawCustomChart(<QUESTION_CODE>, <DATA_SEGMENT_CODE>, max) | Draw's a horizontal bar graph for the given question, and data segment. |
$survey.drawCustomChart(<QUESTION_CODE>, <DATA_SEGMENT_CODE>, max, colorIndex) | Draw's a horizontal bar graph for the given question, and data segment. The colorIndex (0-9) specifies the color to use for displaying the chart. |
$survey.drawSpotlightChart(<QUESTION_CODE>, <DATA_SEGMENT_CODE>, max, colorIndex) | Draw's a horizontal bar graph for the given question with spotlight reporting, and data segment. The colorIndex (0-9) specifies the color to use for displaying the chart. |
Let us assume that there is an open-ended text question with the question code : Q1.
#if (${Q1_1}) $survey.branchTo("Q10") #end
$survey.updateCustom1("Value")
$survey.updateExternalReference("Value")
$survey.updateHighCustomVariable(6, "Value")
#set ($score = $survey.sumValues())
$survey.chainTo(3342)
In the example above, 3342 is the Survey ID you want to chain to.
Adding Custom Scoring / Logic type Question
Piping Text Over Multiple Pages - Example
Text Based Branching - Example
Randomization using Custom Scripting - Example
Branching from Multiple Select type questions