﻿<?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  » Setting new variables</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 05 May 2026 04:38:13 GMT</lastBuildDate><ttl>20</ttl><item><title>Setting new variables</title><link>https://forums.millisecond.com/Topic27178.aspx</link><description>Hello,&lt;br/&gt;&lt;br/&gt;I am currently working on a cross-cultural Old/New Face Recognition Task, I'd like to know how to set new variables to easily read the data once the experiment is completed.&lt;br/&gt;I need to code the gender of the presented stimuli, their ethnicity and if the stimuli were familiar or unfamiliar. I also have to code the participant's gender and ethnicity.&lt;br/&gt;&lt;br/&gt;I tried to set those variables on &amp;lt;values&amp;gt; and then with the /ontrialend attribute, but I am struggling to understand how to code to have them in my data file.&lt;br/&gt;&amp;nbsp;</description><pubDate>Wed, 29 May 2019 05:30:47 GMT</pubDate><dc:creator>Fabiana</dc:creator></item><item><title>RE: Setting new variables</title><link>https://forums.millisecond.com/Topic27219.aspx</link><description>&lt;div data-id="27218" class="if-quote-wrapper" unselectable="on" data-guid="1559132871715"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="27218" 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="27218" 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="27218" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Fabiana - 5/28/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-27218"&gt;&lt;div class="if-quote-message-margin"&gt;Thank you for the response, it really helped me.&amp;nbsp;&lt;br/&gt;But I think I didn't assign the values in the proper way because in the output file it returns only female Asian for all the stimuli.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/gender=1&lt;br/&gt;/ethnicity=1&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="27218"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;The &amp;lt;values&amp;gt; element you posted is not the relevant part. You need to make sure you have the &amp;lt;list&amp;gt; elements and /ontrialend logic down correctly:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ gender = ""&lt;br/&gt;/ ethnicity = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block exampleblock&amp;gt;&lt;br/&gt;/ trials = [1-4 = exampletrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial exampletrial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ ontrialend = [&lt;br/&gt;values.gender = list.gender.nextvalue;&lt;br/&gt;values.ethnicity = list.ethnicity.nextvalue;&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ stimulusframes = [1=examplestimulus]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text examplestimulus&amp;gt;&lt;br/&gt;/ items = exampleitems&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item exampleitems&amp;gt;&lt;br/&gt;/ 1 = "Face A (black male)"&lt;br/&gt;/ 2 = "Face B (black female)"&lt;br/&gt;/ 3 = "Face C (white male)"&lt;br/&gt;/ 4 = "Face D (white female)"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list gender&amp;gt;&lt;br/&gt;/ items = ("male", "female", "male", "female")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.examplestimulus.currentindex&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list ethnicity&amp;gt;&lt;br/&gt;/ items = ("black", "black", "white", "white")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.examplestimulus.currentindex&lt;/strong&gt;&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 group blocknum blockcode trialnum trialcode stimulusitem response latency correct&lt;br/&gt;values.gender values.ethnicity]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;The list elements need to be paired to the face stimulus (cf. &lt;a href="https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htm)."&gt;https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htm).&lt;/a&gt; Double check that part in your script and make sure it's correct.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 29 May 2019 05:30:47 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Setting new variables</title><link>https://forums.millisecond.com/Topic27218.aspx</link><description>Thank you for the response, it really helped me.&amp;nbsp;&lt;br/&gt;But I think I didn't assign the values in the proper way because in the output file it returns only female Asian for all the stimuli.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/gender=1&lt;br/&gt;/ethnicity=1&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 28 May 2019 22:41:27 GMT</pubDate><dc:creator>Fabiana</dc:creator></item><item><title>RE: Setting new variables</title><link>https://forums.millisecond.com/Topic27187.aspx</link><description>&lt;div data-id="27178" class="if-quote-wrapper" unselectable="on" data-guid="1558960215211"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="27178" 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="27178" 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="27178" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Fabiana - 5/25/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-27178"&gt;&lt;div class="if-quote-message-margin"&gt;Hello,&lt;br/&gt;&lt;br/&gt;I am currently working on a cross-cultural Old/New Face Recognition Task, I'd like to know how to set new variables to easily read the data once the experiment is completed.&lt;br/&gt;I need to code the gender of the presented stimuli, their ethnicity and if the stimuli were familiar or unfamiliar. I also have to code the participant's gender and ethnicity.&lt;br/&gt;&lt;br/&gt;I tried to set those variables on &amp;lt;values&amp;gt; and then with the /ontrialend attribute, but I am struggling to understand how to code to have them in my data file.&lt;br/&gt;&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="27178"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Assuming you've managed to set the values you created properly, then all you need to log them is to specify them in your &amp;lt;data&amp;gt; element's /columns:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ gender = ""&lt;br/&gt;/ ethnicity = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block exampleblock&amp;gt;&lt;br/&gt;/ trials = [1-4 = exampletrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial exampletrial&amp;gt;&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.gender = list.gender.nextvalue;&lt;br/&gt;values.ethnicity = list.ethnicity.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=examplestimulus]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text examplestimulus&amp;gt;&lt;br/&gt;/ items = exampleitems&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item exampleitems&amp;gt;&lt;br/&gt;/ 1 = "Face A (black male)"&lt;br/&gt;/ 2 = "Face B (black female)"&lt;br/&gt;/ 3 = "Face C (white male)"&lt;br/&gt;/ 4 = "Face D (white female)"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list gender&amp;gt;&lt;br/&gt;/ items = ("male", "female", "male", "female")&lt;br/&gt;/ selectionmode = text.examplestimulus.currentindex&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list ethnicity&amp;gt;&lt;br/&gt;/ items = ("black", "black", "white", "white")&lt;br/&gt;/ selectionmode = text.examplestimulus.currentindex&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 group blocknum blockcode trialnum trialcode stimulusitem response latency correct&lt;br/&gt;values.gender values.ethnicity]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 27 May 2019 05:39:15 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>