﻿<?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 6  » Total score + branching</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 25 May 2026 02:06:02 GMT</lastBuildDate><ttl>20</ttl><item><title>Total score + branching</title><link>https://forums.millisecond.com/Topic41783.aspx</link><description>Hi all,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I have a survey that consists of four pages. Each surveypage contains four items and each item is scored on a five point scale (1 to 5). I am trying to achieve two things. &lt;br/&gt;&lt;br/&gt;&lt;ul id="if_insertedNode_1768813210417"&gt;&lt;li&gt;First I want to create a total score over all 16 items (simply summing up all item score, no need for reversing item scores).&lt;/li&gt;&lt;li&gt;Second, I want to add branching. If the total score is 32 or less or 75 or more the experiment should simply continue as is (with the next block). If it is within those values then it should skip over a number of blocks. &lt;/li&gt;&lt;/ul&gt;I am trying to find out how I can calculate that total score but couldn't readily find it in the manuals. Also, I am unsure on what level I should calculate this; I assumed the survey level, but perhaps code needs to be added at each surveypage level as well. The same goes for the branching, how and where should I add this?&lt;br/&gt;&lt;br/&gt;Thanks for all the help!&lt;br/&gt;Kevin</description><pubDate>Mon, 19 Jan 2026 15:46:29 GMT</pubDate><dc:creator>k.vanschie@tilburguniversity.edu</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41789.aspx</link><description>&lt;blockquote data-id="41788" class="if-quote-wrapper" unselectable="on" data-guid="1768837475343" contenteditable="false" id="if_insertedNode_1768837473736"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="41788" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="41788" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="41788" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:k.vanschie@tilburguniversity.edu"&gt;k.vanschie@tilburguniversity.edu&lt;/a&gt; - 1/19/2026&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-41788"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Made the change to a block format.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;How can I store the total value in that format? In the raw data I know only see the individual responses to every item, but it would be convenient if I could immediately see the total score (per participant) in a column somewhere. Is that possible?&lt;a class="if-quote-goto quote-link" href="#" data-id="41788"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You need to define a &amp;lt;data&amp;gt; element, with its /columns speciying everything you want loggged. You can find all of this detailed in the documentation and Programmer's Manual.&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/columns.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/columns.htm&lt;/a&gt;</description><pubDate>Mon, 19 Jan 2026 15:46:29 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41788.aspx</link><description>Made the change to a block format.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;How can I store the total value in that format? In the raw data I know only see the individual responses to every item, but it would be convenient if I could immediately see the total score (per participant) in a column somewhere. Is that possible?</description><pubDate>Mon, 19 Jan 2026 15:17:46 GMT</pubDate><dc:creator>k.vanschie@tilburguniversity.edu</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41787.aspx</link><description>&lt;blockquote data-id="41786" class="if-quote-wrapper" unselectable="on" data-guid="1768834293835" contenteditable="false" id="if_insertedNode_1768834292450"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="41786" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="41786" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="41786" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:k.vanschie@tilburguniversity.edu"&gt;k.vanschie@tilburguniversity.edu&lt;/a&gt; - 1/19/2026&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-41786"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;This makes sense! So every subsequent block that needs to be skipped based on the total score needs to contain this piece of code (i made adjustments so that it fits with my experiment):&lt;br/&gt;&lt;br/&gt;&lt;font color="#000000" style="background-color: rgb(145, 231, 255);"&gt;/ skip =[&lt;br/&gt;return (values.VVIQtotal &amp;gt; 32 &amp;amp;&amp;amp; values.VVIQtotal &amp;lt; 75);&lt;br/&gt;]&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Because I have quite a few blocks I wondered if it's possible to jump forward to block X?&lt;br/&gt;&lt;br/&gt;Also, is there a way to store the actual value (in values.VVIQtotal) in the survey file that is created?&lt;a class="if-quote-goto quote-link" href="#" data-id="41786"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt;&amp;nbsp;Because I have quite a few blocks I wondered if it's possible to jump forward to block X?&lt;br/&gt;&lt;br/&gt;No, use /skip.&lt;br/&gt;&lt;br/&gt;&amp;gt; Also, is there a way to store the actual value (in values.VVIQtotal) in the survey file that is created?&lt;br/&gt;&lt;br/&gt;Not if you use &amp;lt;survey&amp;gt;, which produces a separate, wide-format (one row) data file. That data file's output cannot be customized.&lt;br/&gt;&lt;br/&gt;Run your surveypages via a block, as in the example I gave you, and it all goes into a single long-format raw data file, which you can customize however you want.</description><pubDate>Mon, 19 Jan 2026 14:54:46 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41786.aspx</link><description>This makes sense! So every subsequent block that needs to be skipped based on the total score needs to contain this piece of code (i made adjustments so that it fits with my experiment):&lt;br/&gt;&lt;br/&gt;&lt;font color="#000000" style="background-color: rgb(145, 231, 255);"&gt;/ skip =[&lt;br/&gt;return (values.VVIQtotal &amp;gt; 32 &amp;amp;&amp;amp; values.VVIQtotal &amp;lt; 75);&lt;br/&gt;]&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Because I have quite a few blocks I wondered if it's possible to jump forward to block X?&lt;br/&gt;&lt;br/&gt;Also, is there a way to store the actual value (in values.VVIQtotal) in the survey file that is created?</description><pubDate>Mon, 19 Jan 2026 14:27:50 GMT</pubDate><dc:creator>k.vanschie@tilburguniversity.edu</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41785.aspx</link><description>&lt;blockquote data-id="41784" class="if-quote-wrapper" unselectable="on" data-guid="1768826048130" contenteditable="false" id="if_insertedNode_1768826047168"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="41784" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="41784" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="41784" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;&lt;a href="mailto:k.vanschie@tilburguniversity.edu"&gt;k.vanschie@tilburguniversity.edu&lt;/a&gt; - 1/19/2026&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-41784"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Perhaps it's helpful to add what I thought I needed to do for Question 1.&lt;br/&gt;&lt;br/&gt;I declared values at the experiment level&lt;br/&gt;&lt;br/&gt;&lt;span style="background-color: rgb(145, 253, 255);"&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ VVIQtotal = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;At the survey level I added an 'onblockend' property to create the total score and then addd a summary data element:&lt;br/&gt;&lt;br/&gt;### VVIQ SURVEY (BLOCK/SURVEY LEVEL)&lt;br/&gt;&lt;br/&gt;&lt;span style="background-color: rgb(145, 255, 251);"&gt;&amp;lt;survey VVIQ&amp;gt;&lt;br/&gt;/ pages = [1 = VVIQ_PAGE1; 2 = VVIQ_PAGE2; 3 = VVIQ_PAGE3; 4 = VVIQ_PAGE4]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ nextbuttonposition = (90, 90)&lt;br/&gt;/ onblockend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.VVIQtotal =&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ1 + values.VVIQ2 + values.VVIQ3 + values.VVIQ4 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ5 + values.VVIQ6 + values.VVIQ7 + values.VVIQ8 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ9 + values.VVIQ10 + values.VVIQ11 + values.VVIQ12 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ13 + values.VVIQ14 + values.VVIQ15 + values.VVIQ16;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/ columns = (values.VVIQtotal)&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;/span&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="41784"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Values are just variables, they will not do anything unless you set them to something, here: the score for a given question. But that isn't even necessary. Define proper /optionvalues in your survey questions, sum up the responses in a single varaible /onvlockend, and then /skip whatever subsequent blocks you need on that basis. Simple example:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;expt myExpt&amp;gt;&lt;br/&gt;/ blocks = [1=a; 2=b; 3=c]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ totalScore = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block a&amp;gt;&lt;br/&gt;/ onBlockEnd = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.totalScore = (radiobuttons.q1.response + radiobuttons.q2.response + radiobuttons.q3.response + radiobuttons.q4.response)&lt;br/&gt;]&lt;br/&gt;/ trials = [1=pageOne; 2=pageTwo]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage pageOne&amp;gt;&lt;br/&gt;/ questions = [1=q1; 2=q2]&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;surveypage pageTwo&amp;gt;&lt;br/&gt;/ questions = [1=q3; 2=q4]&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 q1&amp;gt;&lt;br/&gt;/ options = ("Option A", "Option B", "Option C", "Option D", "Option E")&lt;br/&gt;/ optionValues = ("1", "2", "3", "4", "5")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons q2&amp;gt;&lt;br/&gt;/ options = ("Option A", "Option B", "Option C", "Option D", "Option E")&lt;br/&gt;/ optionValues = ("1", "2", "3", "4", "5")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons q3&amp;gt;&lt;br/&gt;/ options = ("Option A", "Option B", "Option C", "Option D", "Option E")&lt;br/&gt;/ optionValues = ("1", "2", "3", "4", "5")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons q4&amp;gt;&lt;br/&gt;/ options = ("Option A", "Option B", "Option C", "Option D", "Option E")&lt;br/&gt;/ optionValues = ("1", "2", "3", "4", "5")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block b&amp;gt;&lt;br/&gt;/ skip = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (values.totalScore &amp;gt; 5 &amp;amp;&amp;amp; values.totalScore &amp;lt; 15) // if score is between 5 and 15 (exclusive), block is skipped&lt;br/&gt;]&lt;br/&gt;/ trials = [1=bTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial bTrial&amp;gt;&lt;br/&gt;/ stimulusFrames = [1=bText]&lt;br/&gt;/ validResponse = (" ")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text bText&amp;gt;&lt;br/&gt;/ items = ("This is block B. Your survey score was &amp;lt;%values.totalScore%&amp;gt;.")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block c&amp;gt;&lt;br/&gt;/ trials = [1=cTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial cTrial&amp;gt;&lt;br/&gt;/ stimulusFrames = [1=cText]&lt;br/&gt;/ validResponse = (" ")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text cText&amp;gt;&lt;br/&gt;/ items = ("This is block C. Your survey score was &amp;lt;%values.totalScore%&amp;gt;.")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;[/code]&lt;br/&gt;</description><pubDate>Mon, 19 Jan 2026 13:00:17 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Total score + branching</title><link>https://forums.millisecond.com/Topic41784.aspx</link><description>Perhaps it's helpful to add what I thought I needed to do for Question 1.&lt;br/&gt;&lt;br/&gt;I declared values at the experiment level&lt;br/&gt;&lt;br/&gt;&lt;span style="background-color: rgb(145, 253, 255);"&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ VVIQtotal = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;At the survey level I added an 'onblockend' property to create the total score and then addd a summary data element:&lt;br/&gt;&lt;br/&gt;### VVIQ SURVEY (BLOCK/SURVEY LEVEL)&lt;br/&gt;&lt;br/&gt;&lt;span style="background-color: rgb(145, 255, 251);"&gt;&amp;lt;survey VVIQ&amp;gt;&lt;br/&gt;/ pages = [1 = VVIQ_PAGE1; 2 = VVIQ_PAGE2; 3 = VVIQ_PAGE3; 4 = VVIQ_PAGE4]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showbackbutton = false&lt;br/&gt;/ nextbuttonposition = (90, 90)&lt;br/&gt;/ onblockend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.VVIQtotal =&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ1 + values.VVIQ2 + values.VVIQ3 + values.VVIQ4 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ5 + values.VVIQ6 + values.VVIQ7 + values.VVIQ8 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ9 + values.VVIQ10 + values.VVIQ11 + values.VVIQ12 +&lt;br/&gt;&amp;nbsp;&amp;nbsp;  values.VVIQ13 + values.VVIQ14 + values.VVIQ15 + values.VVIQ16;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/ columns = (values.VVIQtotal)&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;/span&gt;</description><pubDate>Mon, 19 Jan 2026 09:53:36 GMT</pubDate><dc:creator>k.vanschie@tilburguniversity.edu</dc:creator></item></channel></rss>