Answered

Multiple answer logic


Userlevel 2
Badge +1

Hi, I’m new to Typeform, but not to survey scripting. I’m looking for features that I’m used to, but don’t seem to be there from what I’ve seen so far. My apologies if these are somewhere in the knowledge base, but perhaps I’ve been using the wrong terminology to find them. They are:

  1. Exclusive responses. I have a multi-answer question, but if they hit None of These, it should remove all other responses.
  2. Reduced lists. For example, Q1 is Which of these have you ever bought? Q2 is then Which have you bought most often? and should only show those that were selected at Q1. There is also the converse option of showing only those that have NOT been selected at Q1.
  3. Logic off multi-response questions. Only show a subsequent question if the answer to the previous question contains a defined response or set of responses, eg if Q1 includes Car as one of the responses, show Q3a Which model of car? If Q1 includes TV, show Q3b Which model of TV. They can be shown both, one, or neither of the questions at Q3, depending on what they say at Q1.
  4. Logic off more than one question. I understand that this can be done with sequential questions if all the criteria are “and”, eg Under 35 and single and in Scotland; but is it possible to have logic of the form Under 35 OR single OR in Scotland, if that comes from 3 questions?
  5. Piping in text from previous questions. I can see that I can use @ to put previous responses in question text, but it doesn’t appear to allow it in response text. This would be useful in picking up open text to use in a prompted list.

Thanks in advance.

icon

Best answer by Liz 28 April 2022, 21:43

View original

16 replies

Userlevel 7
Badge +5

Hi @ChrisAtCentral Welcome to the community! Sounds like you’re quite the seasoned survey-creator!

Just previewing your questions, it looks like most of these can be solved with logic jumps, though some might involve quite a bit of set up. To elaborate: 

 

  1. If you’re using a multiple choice question with multiple selection turned on, there isn’t a way to automatically de-select the other selected answers should they choose “none of the above.” You would need to create a logic jumps that would send them backwards in the form if they select other answers. 
  2. This would also need to be done using logic jumps and variations of the same question. Since it isn’t possible to automatically remove answer options based on previous selections, you would need to use a logic jump flow like this to show the question that applies based on answers. 
  3. You would use this same logic jump flow. 😀
  4. You can use the above article for the same flow. 
  5. We don’t have this feature available, but happy to share this feedback with our product team. 

If you think of any other questions, let us know!

Userlevel 2
Badge +1

Thanks for all that Liz. I am building up questions as I go along, so I’m sure there will be several. I have two more:

  1. How do we populate a hidden field with fixed values (as opposed to question responses)? I’m thinking that we could have standard fields for regular texts that occur in several common questions; we’d set this at the start, then whenever this occurred we’d just use the @ approach. That way we only have to change it once at the start.
  2. Does the Other option always have to come last? I’ve added it, but I also want a None of the above, which logically should come after it, but it doesn’t seem to let me drag it to the bottom.

Thanks again 🙂

Userlevel 7
Badge +6

@ChrisAtCentral - if you setting the value inside the form itself, you can simply create a Variable and set it to the value ie v_month - text - April .. then v_month would be available inside your form at any time.. and you have the ability to overwrite it with logic rules 

as for the Other option, to have the ‘native’ functionality of filling in the field on that question, you are stuck with the current method of organizing.. 

BUT you could create your form so that IF someone chooses the Other option, you branch them to a short text question “You selected Other from the list - tell us more...” that they could fill in. 

requires a little logic branching addition to your typeform but that might work to give you the sort order you want.. 

 

des

Userlevel 2
Badge +1

Thanks John. That’s the way we’d handle the Other in other software, so no problem with that.

I’ve also seen that the hidden variables are passed in on the URL, so perhaps I’ll set them that way.

Userlevel 7
Badge +6

let us know how it goes! cheers @ChrisAtCentral 

 

des

Userlevel 2
Badge +1

Well, it was going well until I tried the and/or logic. For the None of these, what I need is logic of the form:

If (a or b or c or d) AND (None of these) then jump to the message, then jump back to the question.

Whichever way round I put it (ie with None of these AND followed by lots of ORs, or the ORs first and None of these last) it doesn’t work. The help article shows all ANDs and all ORs, but not how to handle a mixture (which is what one invariably needs to see). I need brackets or grouping of some sort.

Currently A or B and C evaluates to A or (B and C); C and A or B evaluates to (C and A) or B. I require C and (A or B), which doesn’t seem to be possible, since it won’t evaluate the OR first.

Do I have to do this in two stages - a variable which is true with any of the ORs, then AND that with the None of these? Or is it a whole bunch of (A and C) or (B and C) combinations? Hopefully there’s an easier way...

Userlevel 7
Badge +5

Hi @ChrisAtCentral Do you mind sending a screenshot of what you already have set up and what isn’t working with the set up so we can see how to help best? Thanks!

Userlevel 2
Badge +1

This is what I was hoping to do. It does work with multiple conditions, ie (Amazon and None) or (Argos and None) etc, but that obviously get tedious to set up with a long list (I actually have 11 in the full example). In other software, one can bracket the Or conditions so that they are evaluated first. What I’m after is: (One or more answers) AND (None) jumps them to a blocking message, then jumps back, until they have Answers, OR None, but not both.

 

Userlevel 2
Badge +1

One other approach that we use elsewhere to shorten things has just occurred to me - counting the number of responses. If the count of answers is 2 or more, and it has None of the above, then it’s invalid. Is it possible to count and check the number of responses given?

Userlevel 7
Badge +5

@john.desborough do you have something like this set up on your forms? I can’t keep track anymore of the logic sets you have made! 🤣

Userlevel 7
Badge +6

lol. @Liz - i have one of those little test files already set up ...of course.. here it is 

@ChrisAtCentral - the example here is solely based on setting up the ‘pair’ of None and A, None and B, etc.  That seems to be the bullet proof way of getting it to work. 

If you look at this video in the help centre, it talks about the order of logic .. and even though the ‘block layout’ shows something like this: If A and B or C (the voiceover says ‘if A and B or A and C’) , the logic is implemented in two separate rules - A and B jumpto  and A and C jumpto 

 

unfortunately, every time i try to apply SQL-esque thinking to combining and & or in logic rules, Typeform spits hairballs at me. I have found that making it as simple as possible works. It may take a little longer to walk through the building out of the logic rules BUT in the long run it makes it easier for others to maintain the logic. 

des

 

 

Userlevel 2
Badge +1

Thanks John. I would argue that if one is coming at this from any other sort of background, (A or B or C or D) and None is a lot easier to set up and maintain, and get right, that loads of pairs, particularly when it’s not easy to see them all on the screen at one time.

This wouldn’t be the first software to show a very simple example that it can do easily, rather than explain how to do a complex example that many users wish to know 🙄

Userlevel 7
Badge +6

@ChrisAtCentral - but at the moment, we all have to figure out how to be as creative as possible with the logic structure they have implemented at this time.. yeah being able to do as you outline would be wonderful but … 

in the meantime, i think that maybe the best way is a counter variable, as you mentioned earlier, ie v_none_plus (default = 0)

 

logic rules-ish

  • If  q1=’none’ add 1 to v_none_plus
  • if q1 = ‘none’ and q1 = A add 1 to v_none_plus
  • repeat above for other options
  • if v_none_plus gt 1 then jumpto lockout page
  • if v_none_plus = 1 then jumpto appropriate question
  • if q1 = A then jumpto to appropriate spot.. 

that seems to resolve ok. at least after only 3 coffees (i’m down a quart) 

Userlevel 2
Badge +1

Thanks John. I would amend (and hopefully simplify) that slightly - if (q1=a or q1=b or q1=c etc) add 1; if q1=none add 2; then reject if q1=3. Otherwise I don’t think you’re gaining anything over the individual specifications of pairs.

Userlevel 1

Thank you for this @ChrisAtCentral. Lots of obvious and familiar features missing here (and some good workarounds suggested by other users). Hopefully Typeform is listening and adding these to their backlog. 

  1. Reduced lists. For example, Q1 is Which of these have you ever bought? Q2 is then Which have you bought most often? and should only show those that were selected at Q1. There is also the converse option of showing only those that have NOT been selected at Q1

Unfortunately the solution mentioned is a lot of effort and error prone. In other tools, you are able to “pipe” responses from previous questions. Including the full list of selected responses from one multi or single choice, to another single or multi choice. Depending on the number of responses in the first question, your map to created unique questions and logic for every possible answer would get ridiculous. Piping is a must have feature in a survey software. I hope that Typeform considers adding it. 

Reply