﻿<?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  » How to reference a clicked survey response for value calculations...</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 31 May 2026 07:48:16 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to reference a clicked survey response for value calculations...</title><link>https://forums.millisecond.com/Topic11494.aspx</link><description>&lt;p&gt;That clears things up. Thanks Dave!&lt;/p&gt;</description><pubDate>Mon, 21 Oct 2013 13:35:53 GMT</pubDate><dc:creator>mcfubb</dc:creator></item><item><title>RE: How to reference a clicked survey response for value calculations...</title><link>https://forums.millisecond.com/Topic11493.aspx</link><description>&lt;p&gt;Yes, the issue is that you cannot customize data output for &amp;lt;survey&amp;gt; elements. You need to use &amp;lt;block&amp;gt; instead.&lt;/p&gt;</description><pubDate>Mon, 21 Oct 2013 13:26:45 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to reference a clicked survey response for value calculations...</title><link>https://forums.millisecond.com/Topic11492.aspx</link><description>&lt;p&gt;Hey Dave,&lt;/p&gt;
&lt;p&gt;Thanks for your quick response and for pointing out the "==" mistake.&lt;/p&gt;
&lt;p&gt;Perhaps I should have included more of my script info. I used the &amp;lt;survey&amp;gt; element to arrange the pages of my survey, and then referenced that as my block in the overall experiment...perhaps that's why there's an issue. I get a separate datafile for the survey output, in addition to the main output from my other blocks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;so my arrangement is:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&amp;lt;survey SNI&amp;gt;&lt;/div&gt;
&lt;div&gt;/pages=[1=page1; 2=page2; 3=page3; 4=page4; 5=page5; 6=page6; 7=page7; 8=page8; 9=page9; 10=page10; 11=page11; 12=page12]&lt;/div&gt;
&lt;div&gt;&amp;lt;/survey&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&amp;lt;expt&amp;gt;&lt;/div&gt;
&lt;div&gt;/blocks = [1 = learning; 2 = empathysurvey; 3 = recognition; 4 = lonelinesssurvey; 5 = fssqsurvey; 6 = sni ]&lt;/div&gt;
&lt;div&gt;/postinstructions = (outro)&lt;/div&gt;
&lt;div&gt;&amp;lt;/expt&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I included the values in my &amp;lt;data&amp;gt; columns and the columns show up, but the values stay at zero. I believe the issue has to do with the fact that the survey output is being written to a separate data file, which does not include the columns for my values (it is a horizontal arrangement of data with each survey item, latency, and response). Perhaps using the survey element is the issue...&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Any ideas of what I'm doing wrong? Perhaps I should not use the &amp;lt;survey&amp;gt; element but rather the &amp;lt;block&amp;gt; element as you did and arrange them as trials so it all writes to the same datafile and that will solve the issue...I will try that out.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks,&lt;/div&gt;
&lt;div&gt;Daniel&lt;/div&gt;</description><pubDate>Mon, 21 Oct 2013 13:22:02 GMT</pubDate><dc:creator>mcfubb</dc:creator></item><item><title>RE: How to reference a clicked survey response for value calculations...</title><link>https://forums.millisecond.com/Topic11491.aspx</link><description>&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;values&amp;gt;&lt;br /&gt;/networkdiversity=0&lt;br /&gt;/numberofpeople=0&lt;br /&gt;&amp;lt;/values&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;lt;radiobuttons marital&amp;gt;&lt;br /&gt;/caption = "Marital Status"&lt;br /&gt;/options = ("Currently married &amp;amp; living together, or living with someone in marital-like relationship", &lt;br /&gt;"Never married &amp;amp; never lived with someone in a marital-like relationship",&lt;br /&gt;"Separated", "Divorced or formerly lived with someone in a marital-like relationship", "Widowed")&lt;br /&gt;&amp;lt;/radiobuttons&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;surveypage page1&amp;gt;&lt;br /&gt;/caption = "1. Which of the following best describes your marital status?"&lt;br /&gt;/questions = [1=marital]&lt;br /&gt;/showpagenumbers = false&lt;br /&gt;/showquestionnumbers = false&lt;br /&gt;/ ontrialend = [if(radiobuttons.marital.response == "Currently married &amp;amp; living together, or living with someone in marital-like relationship")&lt;br /&gt;values.networkdiversity = values.networkdiversity + 1;&lt;br /&gt;if(radiobuttons.marital.response &lt;span style="color: #ff0000;"&gt;==&lt;/span&gt; "Currently married &amp;amp; living together, or living with someone in marital-like relationship")&lt;br /&gt;values.numberofpeople = values.numberofpeople + 1]&lt;br /&gt;&amp;lt;/surveypage&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;block myblock&amp;gt;&lt;br /&gt;/ trials = [1=page1]&lt;br /&gt;&amp;lt;/block&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;data&amp;gt;&lt;br /&gt;/ columns = [response, values.networkdiversity, values.numberofpeople]&lt;br /&gt;&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;works just fine.&lt;/p&gt;</description><pubDate>Mon, 21 Oct 2013 12:50:55 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>How to reference a clicked survey response for value calculations...</title><link>https://forums.millisecond.com/Topic11490.aspx</link><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;I have a survey on which participants respond either by clicking radiobuttons or values from a dropdown menu.&lt;/p&gt;
&lt;p&gt;I want to add to certain values I have coded depending on the response for each survey item. I can't seem to figure out how to reference the values that are clicked, whether radiobutton or dropdown, such that Inquisit understands what values I want to correspond to each response.&lt;/p&gt;
&lt;p&gt;Please see a sample of the script below, which shows the values I want to update, and the radiobutton and surveypage (including the values I'm trying to update at the ontrialend/ part):&lt;/p&gt;

&lt;p&gt;&amp;lt;values&amp;gt;&lt;/p&gt;
&lt;p&gt;/networkdiversity=0&lt;/p&gt;
&lt;p&gt;/numberofpeople=0&lt;/p&gt;
&lt;p&gt;&amp;lt;/values&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;radiobuttons marital&amp;gt;&lt;/p&gt;
&lt;p&gt;/caption = "Marital Status"&lt;/p&gt;
&lt;p&gt;/options = ("Currently married &amp;amp; living together, or living with someone in marital-like relationship",&amp;nbsp;&lt;/p&gt;
&lt;p&gt;"Never married &amp;amp; never lived with someone in a marital-like relationship",&lt;/p&gt;
&lt;p&gt;"Separated", "Divorced or formerly lived with someone in a marital-like relationship", "Widowed")&lt;/p&gt;
&lt;p&gt;&amp;lt;/radiobuttons&amp;gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;surveypage page1&amp;gt;&lt;/p&gt;
&lt;p&gt;/caption = "1. Which of the following best describes your marital status?"&lt;/p&gt;
&lt;p&gt;/questions = [1=marital]&lt;/p&gt;
&lt;p&gt;/showpagenumbers = false&lt;/p&gt;
&lt;p&gt;/showquestionnumbers = false&lt;/p&gt;
&lt;p&gt;/ ontrialend = [if(radiobuttons.marital.response == "Currently married &amp;amp; living together, or living with someone in marital-like relationship")&lt;/p&gt;
&lt;p&gt;values.networkdiversity = values.networkdiversity + 1;&lt;/p&gt;
&lt;p&gt;if(radiobuttons.marital.response = "Currently married &amp;amp; living together, or living with someone in marital-like relationship")&lt;/p&gt;
&lt;p&gt;values.numberofpeople = values.numberofpeople + 1]&lt;/p&gt;
&lt;p&gt;&amp;lt;/surveypage&amp;gt;&lt;/p&gt;


&lt;p&gt;Could someone please let me know how to do this correctly?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;-Daniel&lt;/p&gt;</description><pubDate>Mon, 21 Oct 2013 11:33:31 GMT</pubDate><dc:creator>mcfubb</dc:creator></item></channel></rss>