﻿<?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  » Organising survey data into single rows per subject when executed from a block element</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 29 Apr 2026 20:10:35 GMT</lastBuildDate><ttl>20</ttl><item><title>Organising survey data into single rows per subject when executed from a block element</title><link>https://forums.millisecond.com/Topic12289.aspx</link><description>&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;Following on from my venture into experimenting with using Inquisit to present some survey data&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic12259.aspx"&gt;this post.&lt;/a&gt;&lt;div&gt;&lt;div&gt;&lt;a href="https://www.millisecond.com/forums/Topic12259.aspx"&gt;&lt;br/&gt;&lt;/a&gt;&lt;/div&gt;I wonder if there may be a way to set up this task to store the data in a single row for each subject after having used a block element.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;A simplified example:&lt;/div&gt;&lt;br/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;block demographics&amp;gt;&lt;/div&gt;&lt;div&gt;/trials = [1=demographics1]&lt;/div&gt;&lt;div&gt;&amp;lt;/block&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 10pt;"&gt;&amp;lt;surveypage demographics1&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;/ caption = "Please answer the following demographic questions"&lt;/div&gt;&lt;div&gt;/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)&lt;/div&gt;&lt;div&gt;/ questions = [1=sex; 2=age]&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;lt;/surveypage&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;dropdown sex&amp;gt;&lt;/div&gt;&lt;div&gt;/ caption = "Sex"&lt;/div&gt;&lt;div&gt;/ options = ("female", "male")&lt;/div&gt;&lt;div&gt;&amp;lt;/dropdown&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;textbox age&amp;gt;&lt;/div&gt;&lt;div&gt;/ caption = "Age"&lt;/div&gt;&lt;div&gt;/ mask = positiveinteger&lt;/div&gt;&lt;div&gt;/ range = (7, 110)&lt;/div&gt;&lt;div&gt;&amp;lt;/textbox&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;I wonder if there is a way to write a data element (or similar) that will do as described above?&lt;div&gt;&lt;span style="font-size: 10pt;"&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&amp;lt;data&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;/ columns = [subject, dropdown.sex.response, textbox.age.response]&lt;/div&gt;&lt;div&gt;/file = "responses.iqdat"&lt;/div&gt;&lt;div&gt;&amp;lt;/data&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;/div&gt;Thank you&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Marcel&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="https://www.millisecond.com/forums/Topic12259.aspx"&gt;&lt;/a&gt;&lt;/div&gt;</description><pubDate>Mon, 10 Feb 2014 01:10:36 GMT</pubDate><dc:creator>Marcel</dc:creator></item><item><title>RE: Organising survey data into single rows per subject when executed from a block element</title><link>https://forums.millisecond.com/Topic12290.aspx</link><description>If you want a single-line data file for survey data, why don't you use the &amp;lt;survey&amp;gt; element? A &amp;lt;survey&amp;gt; element is a special type of &amp;lt;block&amp;gt; and can be run via the &amp;lt;expt&amp;gt; element's /blocks attribute.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Note, though, that you *don't* want to use &amp;lt;survey&amp;gt; elements if you happen to repeat some &amp;lt;surveypage&amp;gt; elements or question elements over an over. How could that be captured in a single line file? Single-line survey data provides *one column per question*, thus different responses to repeated instances of a given question element simply cannot be captured that way.&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;/div&gt;Instead, you need to re-structure / aggregate your data using your preferred data management / statistical analysis application. All of them provide facilities to do so -- such data preparation it is a routine task in the course of most computerized data collection and research.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Edited to add: Example for the above -- observe the differences between the 3 resulting data files and how they correspond to the respective &amp;lt;survey&amp;gt;s vs. &amp;lt;block&amp;gt; setup.&lt;br/&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;font face="Courier New"&gt;&amp;lt;expt myexpt&amp;gt;&lt;br/&gt;/ blocks = [1=mysurvey1; 2=mysurvey2; 3=myblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey mysurvey1&amp;gt;&lt;br/&gt;/ pages = [1-2=mypage1]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;survey mysurvey2&amp;gt;&lt;br/&gt;/ pages = [1=mypage1; 2=mypage2]&lt;br/&gt;&amp;lt;/survey&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-2=mypage1]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage mypage1&amp;gt;&lt;br/&gt;/ questions = [1=myrb]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage mypage2&amp;gt;&lt;br/&gt;/ questions = [1=myrb]&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;radiobuttons myrb&amp;gt;&lt;br/&gt;/ options = ("A", "B", "C", "D", "E", "F")&lt;br/&gt;&amp;lt;/radiobuttons&amp;gt;&lt;/font&gt;</description><pubDate>Mon, 10 Feb 2014 01:10:36 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>