﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Branching and multiple response modes</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sat, 04 Jul 2026 23:25:33 GMT</lastBuildDate><ttl>20</ttl><item><title>Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic14994.aspx</link><description>I am new to Inquisit, but I have computing background, so scripting per se is not a problem.&lt;br/&gt;I have not found a solution or an example to answer the following two questions.&lt;br/&gt;&lt;br/&gt;1. how to make a branch which is based on the number of certain responses the participant has given in the past. Example, on the paper questionnaire: "If you answered YES three or more times, answer the following 2 questions." I want the Inquisit to implement the branching, not the participant.&lt;br/&gt;2.&amp;nbsp; How to have several answers using different response modes to a single question? For instance two likert scales and a textbox.&lt;br/&gt;Thank you for any help!&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 25 Nov 2014 05:21:21 GMT</pubDate><dc:creator>teilai</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15070.aspx</link><description>#1: You state&lt;br/&gt;&lt;br/&gt;"Basically what I want to do, is to count how many times the participants answers "Yes" to trials in consomm2, and if they do at least 3 times, ask them extra questions in consomm2ih, otherwise jump to consomm3."&lt;br/&gt;&lt;br/&gt;The way to do this is to /skip consomm2ih if the condition is not met. I.e. do&lt;br/&gt;&lt;br/&gt;&amp;lt;block part_1&amp;gt;&lt;br/&gt;...&lt;br/&gt;/trials = [1-2 = consomm1; 3-9 = consomm2; 10-11 = consomm2hi; 12-15 = consomm3; 16-17 = consomm3ef]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;with &lt;br/&gt;&lt;br/&gt;&amp;lt;likert consomm2hi&amp;gt;&lt;br/&gt;/ skip = [values.myscore &amp;lt; 3 ]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;#2: Your &amp;lt;list&amp;gt; element's /items attribute is invalid. You need to use (...) not [...]&lt;br/&gt;&lt;br/&gt;&amp;lt;list questionlist&amp;gt;&lt;br/&gt;/items = &lt;strong&gt;(&lt;/strong&gt;"Orange, citron, clémentines, pamplemousse", "Prunes, pruneaux", "Courgette, potimarron, ou autre courge", "Salade", "Noix",&lt;br/&gt;"Maquereau", "Sardine ou hareng", "Saumon", "Esturgeon", "Merlu, truite", "Boeuf", "Porc", "Agneau", "Cheval", "Volaille", "Œuf",&lt;br/&gt;"Sucre blanc", "Sucre roux", "Miel", "Confiture", "Pâte à tartiner au chocolat", "Rapadura", "Aspartame", "Huile d'olive",&lt;br/&gt;"Huile de tournesol", "Huile de noix", "Huile de lin", "Huile de bourrache ou onagre", "Huile de soja", "Huile de cameline",&lt;br/&gt;"Huile de colza", "Huile de palme ou coco"&lt;strong&gt;)&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;</description><pubDate>Tue, 25 Nov 2014 05:21:21 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15061.aspx</link><description>[quote][b]Dave (11/24/2014)[/b][hr]Your /branch attributes ought to reside at the &amp;lt;trial&amp;gt; / &amp;lt;likert&amp;gt; / &amp;lt;surveypage&amp;gt; level, not the &amp;lt;block&amp;gt; level.[/quote]&lt;br/&gt;&lt;br/&gt;I have the counter for "yes" responses in the likert element:&lt;br/&gt;&amp;lt;likert consomm2&amp;gt;&lt;br/&gt;/anchors = [1="Oui"; 2="Non"]&lt;br/&gt;/stimulusframes = [1 = consomm2]&lt;br/&gt;/ontrialend = [if (likert.consomm2.response==1) values.myscore2+=1]&lt;br/&gt;/mouse=true&lt;br/&gt;/numpoints=2&lt;br/&gt;/position= (50, 80)&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;I don't understand how it would ever work if I have the branch there too, since all questions need to be answered, and what happens next depends on how many "yes" responses there were.&lt;br/&gt;&lt;br/&gt;[quote]&lt;br/&gt;since you do not provide any relevant code. I am also confused with your references to likert elements ("The questions are text elements with likert scales attached to them.") -- &amp;lt;surveypage&amp;gt;s and &amp;lt;likert&amp;gt;s are different things.&lt;br/&gt;[/quote]&lt;br/&gt;&lt;br/&gt;There were two issues in my original post, one has to do with branching and the other with how to have several different responses to a single question.&lt;br/&gt;A surveypage was suggested to solve the latter. I have:&lt;br/&gt;&amp;lt;surveypage alimentation&amp;gt;&lt;br/&gt;/questions = [1 = consommation; 2 = quantite; 3 = mode]&lt;br/&gt;/ontrialbegin = [values.myquestion=list.questionlist.nextvalue]&lt;br/&gt;/ontrialend = [if (radiobuttons.consommation.response=="Non") list.questionlist.nextvalue]&lt;br/&gt;/caption = "&amp;lt;%values.myquestion%&amp;gt;"&lt;br/&gt;/showpagenumbers = false&lt;br/&gt;/showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list questionlist&amp;gt;&lt;br/&gt;/items = ["Orange, citron, clémentines, pamplemousse", "Prunes, pruneaux", "Courgette, potimarron, ou autre courge", "Salade", "Noix",&lt;br/&gt;"Maquereau", "Sardine ou hareng", "Saumon", "Esturgeon", "Merlu, truite", "Boeuf", "Porc", "Agneau", "Cheval", "Volaille", "Œuf", &lt;br/&gt;"Sucre blanc", "Sucre roux", "Miel", "Confiture", "Pâte à tartiner au chocolat", "Rapadura", "Aspartame", "Huile d'olive",&lt;br/&gt;"Huile de tournesol", "Huile de noix", "Huile de lin", "Huile de bourrache ou onagre", "Huile de soja", "Huile de cameline", &lt;br/&gt;"Huile de colza", "Huile de palme ou coco"]&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons consommation&amp;gt;&lt;br/&gt;/caption = "Consommation"&lt;br/&gt;/options = ("Oui" , "Non")&lt;br/&gt;/position = (50, 20)&lt;br/&gt;/required = false&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox quantite&amp;gt;&lt;br/&gt;/caption = "Quantité (en grammes)"&lt;br/&gt;/required = false&lt;br/&gt;/position = (50, 50)&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons mode&amp;gt;&lt;br/&gt;/caption = "Mode de préparation"&lt;br/&gt;/options = ("Cru" , "Cuit")&lt;br/&gt;/required = false&lt;br/&gt;/position = (50, 70)&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;The radiobuttons and the textbox show up properly, but the questions in the list do not. And the branch does not work either.&lt;br/&gt;</description><pubDate>Tue, 25 Nov 2014 00:07:09 GMT</pubDate><dc:creator>teilai</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15053.aspx</link><description>Your /branch attributes ought to reside at the &amp;lt;trial&amp;gt; / &amp;lt;likert&amp;gt; / &amp;lt;surveypage&amp;gt; level, not the &amp;lt;block&amp;gt; level.&lt;br/&gt;&lt;br/&gt;I cannot speak on the topic of&lt;br/&gt;&lt;br/&gt;" I get the different question types (radiobuttons and the textbox) show up correctly, but the question text does not (the elements in the list)"&lt;br/&gt;&lt;br/&gt;since you do not provide any relevant code. I am also confused with your references to likert elements ("The questions are text elements with likert scales attached to them.") -- &amp;lt;surveypage&amp;gt;s and &amp;lt;likert&amp;gt;s are different things.&lt;br/&gt;</description><pubDate>Mon, 24 Nov 2014 06:55:47 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15052.aspx</link><description>Thanks for the help. Following the advice, I get the different question types (radiobuttons and the textbox) show up correctly, but the question text does not (the elements in the list) &lt;br/&gt;&lt;br/&gt;And the branching does not work at all. I have a block:&lt;br/&gt;&amp;lt;block part_1&amp;gt;&lt;br/&gt;/preinstructions = (instr_p1)&lt;br/&gt;/trials = [1-2 = consomm1; 3-9 = consomm2; 10-11 = consomm2hi; 12-15 = consomm3; 16-17 = consomm3ef]&lt;br/&gt;/branch = [if (values.myscore2 &amp;lt; 3) likert.consomm3]&lt;br/&gt;/branch = [if (values.myscore3 == 0) 0]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Basically what I want to do, is to count how many times the participants answers "Yes" to trials in consomm2, and if they do at least 3 times, ask them extra questions in consomm2ih, otherwise jump to consomm3. The other branch command works essentially the same, only that only 1 "Yes" is required. Which ever way I give the condition, the extra questions are always asked, even if I don't give a single "Yes" response. The questions are text elements with likert scales attached to them. And they work fine, the branching does not. From elsewhere in this forum I've understood that I should branch to the likert element, not the text element. Still, when I run the script I get the error message that consomm3 in the branch command is wrong type.&lt;br/&gt;</description><pubDate>Mon, 24 Nov 2014 04:40:01 GMT</pubDate><dc:creator>teilai</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15044.aspx</link><description>Re. #1: A &amp;lt;likert&amp;gt; element is a special type of &amp;lt;trial&amp;gt;, as is a &amp;lt;surveypage&amp;gt; element. All of them have /ontrialend attributes.&lt;br/&gt;&lt;br/&gt;Re #2: No, you do not necessarily need to create a separate &amp;lt;surveypage&amp;gt; for each question.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ myquestion = ""&lt;br/&gt;/ myscore = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-3=mypage]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage mypage&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.myquestion=list.questionlist.nextvalue]&lt;br/&gt;/ ontrialend = [if (radiobuttons.myrb.response=="certain") values.myscore+=1]&lt;br/&gt;/ caption = "&amp;lt;%values.myquestion%&amp;gt;"&lt;br/&gt;/ questions = [1=myrb; 2=mytb]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons myrb&amp;gt;&lt;br/&gt;/ options = ("certain", "uncertain")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;textbox mytb&amp;gt;&lt;br/&gt;&amp;lt;/textbox&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list questionlist&amp;gt;&lt;br/&gt;/ items = ("Question 1", "Question 2", "Question 3")&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [date time subject blocknum blockcode trialnum trialcode latency response values.myquestion values.myscore]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 20 Nov 2014 05:49:11 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic15042.aspx</link><description>[quote][b]Dave (11/14/2014)[/b][hr]Re. #1: Use a &amp;lt;values&amp;gt; entry (i.e. a global variable), sum up the "certain" responses in that value via /ontrialend attributes in your &amp;lt;trial&amp;gt;(s), /branch based on that value.&lt;br/&gt;&lt;br/&gt;Re. #2: You need to set up a &amp;lt;surveypage&amp;gt; and put &amp;lt;radiobuttons&amp;gt; and &amp;lt;textbox&amp;gt; elements on it as needed.&lt;br/&gt;[/quote]&lt;br/&gt;&lt;br/&gt;#1: My trials are /text elements (with a likert scale associated to them), so they don't contain /ontrialend attribute. I am not sure how to combine that to trials element. Maybe I can use /likert element's /ontrialend?&lt;br/&gt;#2: Are you suggesting that I create a separate &amp;lt;surveypage&amp;gt; for each question? That's the only way I've figure out so far ...&lt;br/&gt;</description><pubDate>Thu, 20 Nov 2014 04:34:42 GMT</pubDate><dc:creator>teilai</dc:creator></item><item><title>RE: Branching and multiple response modes</title><link>https://forums.millisecond.com/Topic14997.aspx</link><description>Re. #1: Use a &amp;lt;values&amp;gt; entry (i.e. a global variable), sum up the "certain" responses in that value via /ontrialend attributes in your &amp;lt;trial&amp;gt;(s), /branch based on that value.&lt;br/&gt;&lt;br/&gt;Re. #2: You need to set up a &amp;lt;surveypage&amp;gt; and put &amp;lt;radiobuttons&amp;gt; and &amp;lt;textbox&amp;gt; elements on it as needed.&lt;br/&gt;</description><pubDate>Fri, 14 Nov 2014 07:01:38 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>