Logo Help Center
Chat with us
Open a ticket
Sign in
  1. aytm Help Center
  2. aytm Logic
  3. General

Articles in this section

  • Overview
  • Demographic Trait reference logic
  • Using Logic to End a Response
  • aytm Logic Glossary
  • Question Modifiers
  • Survey Flow Operations
  • Punch Logic
  • Miscellaneous aytm Logic information
  • Pipe Answers from a Rank Question Type

Punch Logic

Use Punch logic to assign an answer or value to a respondent without requiring them to see a question. Punch logic allows users to "code" or categorize respondents by assigning them a value or answer to a question that can be used in analysis.

Punch logic is recommended for advanced aytm Logic users.

 

Placement and Syntax of Punch logic

Punch logic can be applied to question text or answer options using the following elements:

  • punch: Command to create logic 
  • Reference : Command logic applies to (e.g. Q2a1, Q5, Q6a2-5,etc.)
  • value_or_variable_or_logic_or_reference as value : What value should be recorded for the respondent for the item being punched for applicable question types (e.g. 5 as value) 
  • “value_or_variable_or_logic_or_reference” as comment : What value should be logged for the respondent for the item being punched for applicable question types (e.g. “n/a” as comment)
  • if condition : Only apply the command under certain conditions (e.g. if gender=’f’, if Q1a4, etc.)
[punch reference, value_or_variable_or_logic_or_reference as value, 
“value_or_variable_or_logic_or_reference” as comment if condition]

Example: [punch Q2a1, 5 as value, “n/a” as comment, if Q1a3]
Result: Q2A1 is given a value of 5 with the comment "n/a"
if the respondent selects A3 for Q1

 


 

Order of operations

The punch command is applied after show/hide logic (if any) and randomization.


Note: Different questions will have different syntax and rules for the punch command. Additionally, this logic does not support multiple punch logic statements within a single answer option. If there are multiple conditions, all conditions must be contained in a single logic string.

Examples:

[punch]
[punch 5 as value, 'lorem ipsum' as comment] (in answer option)
[punch Q1A2PV as value if Q1A2pv=1]
[punch Q1SQ2A3, 5 as value, 'lorem ipsum' as comment if Q1A2-4]
[punch Q1A2, var_number as value, var_string as comment]
[punch if PQ1A1 and age>=18 and age<=24]

 


 

Supported Question Types

Question Type Value supported? Comment Supported?
Radio Button No Yes
Checkbox No Yes
Reorder and Side-by-side

Yes (means order number)

No
Distribute

Yes (mandatory; should be positive (>=0) and less or equal than question’s sum)

No
Stars Yes (mandatory; should be in the stars range, e.g. 1-5 if 5 stars are used, or 0 if N/A enabled) No
Smiley

Yes

(mandatory; Value should be in one of the smile ranges: -1, 1, -1, 0, 1, -2, -1, 0, 1, 2 depending of smile count option; the midpoint smiley face is always 0. Left is negative and right is positive.)

No
Open Ended No

Yes

(mandatory unless question is optional)

Form No

Yes

(mandatory unless question is optional)

Instruction text/Video/Image No No
Slider No No
Progressive Matrix No Yes

 


 

Use Case: Punch a Radio button question

Q9 will be used to segment respondents into two binary groups, based on their response to Q8.

Punch logic is added to the answer options (binary groups) in Q9, so that though respondents will not see Q9, on the Results page, researchers will see the data recorded for quick filtering.

Snag_57f30333.png

 


 

Use Case: Punch a Reorder question

Respondents who select only one answer choice in Q4 should be automatically sent through Q5 without seeing the question, since they would have one option to rank.

The answer choice they made in Q4 is automatically marked as their top rank in the data for Q5.

Snag_583868b4.png

 


 

Use Case: Punch a distribute (constant sum) question

Respondents who select only one answer choice in Q6 should be automatically sent through Q7 without seeing the question, since they would have one option to allocate a percentage.

The one answer option they chose in Q6 is automatically given 100% in Q7

Snag_583a35c3.png
  • Facebook
  • Twitter
  • LinkedIn
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Return to top
  • Our platform
  • Solutions
  • Pricing
  • Our panels
  • Help center
  • Contact us
  • Blog
  • Privacy
  • TOU
  • About
  • Careers
  • Innovation lab
  • Demo
© 2022, Umongous, Inc. All rights reserved.

zendesk theme design by aytm c/o diziana