In aytm logic, references and aliases can be used in multiple ways, achieving a wide range of possible text and survey flow manipulations.
How to Convert to Numeric Value
There are multiple places where there is a need to convert text into a number for further manipulations. This is valid for almost all reference modifiers, and can be achieved by appending “V” at the end of the command. This tells the algorithm to attempt to smartly convert the text into a simple numeric value. In most cases it would search for digits until it hits a non-numeric symbol, or the end of text. If it is impossible to find a number, the algorithm returns 0.
For open-ended question, or questions that support open-ended responses on item level, the open-ended response can be converted to a number with this operation. We recommend using Forms question type with a numeric mask such as ### to enforce numeric only input to avoid respondents entering non-numeric symbols.
For references that use positional modifier “P”, the system converts the texts into numbers knowing that “first”=1, “second”=2, and so on. This allows for cleaner logic such as [show if Q5A5pv<4] that would show the element only if Q5A5 item was in the top 3 positions in Q5. This numeric value functionality is especially useful for question types that support numeric input, such as Distribute (actual numerical input), Polarity Scale (0-100 values), Smileys (e.g. for 3 smileys values are -1, 0, 1), Stars (star count).
|
Common Use Case Examples
- [Q1A1pv] - assuming Q1 was a ranking exercise, this logic would pipe-in the numeric value of a position of the first element in Q1.
- [skip to EXIT if Q1A1cv<18 or Q1A1cv>25] - assuming Q1 was Forms question type with the first element enforcing numeric input, this would redirect all respondents out of the survey if their response to the Forms field was less than 18 or greater than 25.
- [show if Q1cv>0] You said you use shampoo [Q1cv] times a week - Q1 was a simple open-ended question, asking how many times respondent uses shampoo per week. The response is then converted to a number, and only people who entered a number, and this number being greater than 0, would be shown the next question where this logic resides.
- [hide if Q5SQ1rv<10] - Q5 is a distribute question type, asking to allocate 100 dollars on different items (simulation of a shopping experience). First item (SQ1) was a branded toothbrush. The next question (where this logic is located) will not be shown if the amount allocated to the branded toothbrush is less than 10 dollars.
- You are in a good mood about these products. Please share the details. [show if Q8SQ1rv>0 and Q8SQ2rv>0] - Q8 is Smileys question type with 5 possible smileys. The element would be shown only if all of the two elements in Q8 received positive (higher than neutral) smileys. Remember: smileys are coded as -2 -1 0 1 2.
- You said you find this product Calm. Which of these were the reasons [show if Q9SQ1A1 and Q9SQ1rv>60] - Q9 is Polarity Scale question type, exploring respondents’ opinion on a product on two-sided scales. First pair was Calm-Exciting. The next question (this logic’s location) will only be shown to respondents who’ve dragged the slider to the Calm side (Q9SQ1A1), and their slider was far away from center (Q9SQ1RV>60). Remember: Polarity Scale ranges from 0 to 100 both directions.
|