﻿<?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 write the stimulus filename to the result file</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 24 Sep 2026 11:38:26 GMT</lastBuildDate><ttl>20</ttl><item><title>How write the stimulus filename to the result file</title><link>https://forums.millisecond.com/Topic23198.aspx</link><description>Hello&lt;br/&gt;&lt;br/&gt;I am using the following code to switch between two different stimulus files based on the subject.id:&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) == 0]&lt;br/&gt;/file = "Stimuli1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) &amp;gt; 0]&lt;br/&gt;/file = "Stimuli2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.&lt;br/&gt;&lt;br/&gt;Best wishes Jens&lt;br/&gt;&lt;br/&gt;</description><pubDate>Fri, 12 Jan 2018 02:23:27 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: How write the stimulus filename to the result file</title><link>https://forums.millisecond.com/Topic23201.aspx</link><description>&lt;div data-id="23199" class="if-quote-wrapper" unselectable="on" data-guid="1515752590689"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23199" 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="23199" 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="23199" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Thursday, January 11, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23199"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23198" class="if-quote-wrapper" unselectable="on" data-guid="1515752590689"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23198" 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="23198" 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="23198" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jens - Thursday, January 11, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23198"&gt;&lt;div class="if-quote-message-margin"&gt;Hello&lt;br/&gt;&lt;br/&gt;I am using the following code to switch between two different stimulus files based on the subject.id:&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) == 0]&lt;br/&gt;/file = "Stimuli1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) &amp;gt; 0]&lt;br/&gt;/file = "Stimuli2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.&lt;br/&gt;&lt;br/&gt;Best wishes Jens&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23198"&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;You can use the same logic as in your /precondition attributes /onexptbegin to write the information to a &amp;lt;values&amp;gt; entry. Then log that value to the data file.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ stimulusfile = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ onexptbegin = [if (mod(script.subjectid,2) == 0) values.stimulusfile = "Stimuli1.iqx" else values.stimulusfile = "Stimuli2.iqx"]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [..., values.stimulusfile, ...]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23199"&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;Thanks. &lt;br/&gt;&lt;br/&gt;Best wishes Jens&lt;br/&gt;</description><pubDate>Fri, 12 Jan 2018 02:23:27 GMT</pubDate><dc:creator>jens</dc:creator></item><item><title>RE: How write the stimulus filename to the result file</title><link>https://forums.millisecond.com/Topic23199.aspx</link><description>&lt;div data-id="23198" class="if-quote-wrapper" unselectable="on" data-guid="1515689642109"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23198" 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="23198" 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="23198" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jens - Thursday, January 11, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23198"&gt;&lt;div class="if-quote-message-margin"&gt;Hello&lt;br/&gt;&lt;br/&gt;I am using the following code to switch between two different stimulus files based on the subject.id:&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) == 0]&lt;br/&gt;/file = "Stimuli1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/precondition = [mod(script.subjectid,2) &amp;gt; 0]&lt;br/&gt;/file = "Stimuli2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.&lt;br/&gt;&lt;br/&gt;Best wishes Jens&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23198"&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;You can use the same logic as in your /precondition attributes /onexptbegin to write the information to a &amp;lt;values&amp;gt; entry. Then log that value to the data file.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ stimulusfile = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ onexptbegin = [if (mod(script.subjectid,2) == 0) values.stimulusfile = "Stimuli1.iqx" else values.stimulusfile = "Stimuli2.iqx"]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [..., values.stimulusfile, ...]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;</description><pubDate>Thu, 11 Jan 2018 08:57:12 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>