﻿<?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 5  » Assigning group number using subject ID</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 09 Apr 2026 20:10:43 GMT</lastBuildDate><ttl>20</ttl><item><title>Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21530.aspx</link><description>Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben</description><pubDate>Fri, 12 May 2017 08:07:27 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21581.aspx</link><description>&lt;div data-id="21580" class="if-quote-wrapper" unselectable="on" data-guid="1494601428416"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21580" 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="21580" 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="21580" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21580"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21579" class="if-quote-wrapper" unselectable="on" data-guid="1494601428416"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21579" 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="21579" 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="21579" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21579"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21576" class="if-quote-wrapper" unselectable="on" data-guid="1494601428416"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21576" 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="21576" 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="21576" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21576"&gt;&lt;div class="if-quote-message-margin"&gt;Thanks Dave, &lt;br/&gt;&lt;br/&gt;I should have said that I had tried that method, however due to the limitations you mentioned here&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;https://www.millisecond.com/forums/Topic8594.aspx#bm8598&lt;/a&gt;&lt;/a&gt; with the include element being overwhelmed (I think in this case by too many expressions in the /precondition attribute, i.e. around 60 script.subjectid == "xxxx" expressions).&lt;br/&gt;&lt;br/&gt;Please disregard my last post as I've now worked around these limitations by splitting the number of /precondition expressions into another include element i.e:&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;This is all working well now, however I've encountered another problem: the &amp;lt;batch&amp;gt; scripts that are referenced from the &amp;lt;include&amp;gt; elements (e.g. / file = "batch_taskorder1.iqx") are not executing. &lt;br/&gt;&lt;br/&gt;When I run the above &amp;lt;include&amp;gt; script, it extracts elements from the appropriate &amp;lt;batch&amp;gt; script, however the &amp;lt;batch&amp;gt; script does not run. &lt;br/&gt;&lt;br/&gt;When I reference an individual task script in the &amp;lt;include&amp;gt; element as you said in your last post (&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;https://www.millisecond.com/forums/Topic19661.aspx#bm19667)&lt;/a&gt;&lt;/a&gt; it works, however due to the way I am counterbalancing I need it to reference a batch script. &lt;br/&gt;&lt;br/&gt;Any thoughts on this? I've attached the &amp;lt;include&amp;gt; script (start_script_include) and the batch scripts for reference.&lt;br/&gt;&lt;br/&gt;Thanks once again!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21576"&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;Sorry, you can't &amp;lt;include&amp;gt; &amp;lt;batch&amp;gt;-scripts. &amp;lt;batch&amp;gt; scripts work somewhat differently than regular / "actual" scripts -- they control the execution of regular scripts -- and hence run in a different "control thread" if you will. You basically can't start (another) such control thread once you're in the "regular" script execution thread, which is where "start_script_include.iqx" is executed.&lt;br/&gt;&lt;br/&gt;I know this is frustrating.&lt;br/&gt;&lt;br/&gt;Going back to your 2nd post ( &lt;a href="https://www.millisecond.com/forums/FindPost21536.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost21536.aspx"&gt;https://www.millisecond.com/forums/FindPost21536.aspx&lt;/a&gt;&lt;/a&gt; ), your concern was that you couldn't use the groupnumber for &amp;lt;batch&amp;gt; condition assignment because one of the scripts run by the &amp;lt;batch&amp;gt; elements also relies on the groupnumber to counterbalance block order. It is not strictly true that this precludes using groupnumber in &amp;lt;batch&amp;gt;es. You can put &lt;br/&gt;&lt;br/&gt;// order 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1,2,3,4 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// order 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (5,6,7,8 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;in a single batch script file. This will ensure that the scripts run by the respective batches *also* get varying groupnumbers and hence can counterbalance blocks and the like based on the groupnumber. More on how condition assignment works mathematically is here: &lt;a href="https://www.millisecond.com/forums/Topic13856.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/Topic13856.aspx"&gt;https://www.millisecond.com/forums/Topic13856.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Would that approach help / solve the problem?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21579"&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;Ok that's a shame - I thought I nearly had it there! &lt;br/&gt;&lt;br/&gt;I'm not sure that solution would work - I've attached my counterbalancing sheet with the issues I will have if I try to counterbalance one of my tasks (Task2) with a sequential groupnumber - effectively I've got 8 different conditions (looking at the combinations of Task_order and Task2_version in the sheet) with 6 participants in each condition.&lt;br/&gt;&lt;br/&gt;I could write 8 different batch files&amp;nbsp;&lt;br/&gt;&lt;br/&gt;// Task_order_1 Task2_Version1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1,2,3,4,5,6 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;/ file = "Task2_version1.iqx"&lt;br/&gt;/ file = "Task3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// Task_order_2 Task2_Version1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (7,8,9,10,11,12 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;&lt;span style="font-size: 13.3333px;"&gt;/ file = "Task3.iqx"&lt;br/&gt;&lt;/span&gt;/ file = "Task2_version1.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// Task_order_1 Task2_Version2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (13,14,15,16,17,18 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;&lt;span style="font-size: 13.3333px;"&gt;/ file = "Task2_version2.iqx"&lt;br/&gt;&lt;/span&gt;/ file = "Task3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;etc... but then I'd be worried that if for some reason one administration of the web experiment didn't work/crashed and had to be done again, the subsequent groupnumber (i.e. the groupnumber on readministration of the task) would &amp;nbsp;not match up with the appropriate counterbalancing groupnumber (as it would be &amp;nbsp;correct groupnumber +1) - is this correct?&lt;br/&gt;&lt;br/&gt;As a result I've decided to go for the manual option and pass the appropriate groupnumber for Task2 (read from the counterbalancing sheet) through the URL parameter on the web script.&lt;br/&gt;&lt;br/&gt;Thanks for all of your help.&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="21580"&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;&amp;gt; I'd be worried that if for some reason one administration of the web experiment didn't work/crashed and had to be done again, the subsequent groupnumber (i.e. the &lt;br/&gt;&amp;gt; groupnumber on readministration of the task) would &amp;nbsp;not match up with the appropriate counterbalancing groupnumber (as it would be &amp;nbsp;correct groupnumber +1) - is this &lt;br/&gt;&amp;gt; correct?&lt;br/&gt;&lt;br/&gt;Yes, under some circumstances this could occur (it would depend on *how* things went wrong in a given instance). To eliminate that risk, I absolutely agree that explicitly specifying the groupnumber via a URL query parameter is the best / closest to fail-safe option.&lt;br/&gt;</description><pubDate>Fri, 12 May 2017 08:07:27 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21580.aspx</link><description>&lt;div data-id="21579" class="if-quote-wrapper" unselectable="on" data-guid="1494568633316"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21579" 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="21579" 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="21579" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21579"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21576" class="if-quote-wrapper" unselectable="on" data-guid="1494568633316"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21576" 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="21576" 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="21576" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21576"&gt;&lt;div class="if-quote-message-margin"&gt;Thanks Dave, &lt;br/&gt;&lt;br/&gt;I should have said that I had tried that method, however due to the limitations you mentioned here&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;https://www.millisecond.com/forums/Topic8594.aspx#bm8598&lt;/a&gt;&lt;/a&gt; with the include element being overwhelmed (I think in this case by too many expressions in the /precondition attribute, i.e. around 60 script.subjectid == "xxxx" expressions).&lt;br/&gt;&lt;br/&gt;Please disregard my last post as I've now worked around these limitations by splitting the number of /precondition expressions into another include element i.e:&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;This is all working well now, however I've encountered another problem: the &amp;lt;batch&amp;gt; scripts that are referenced from the &amp;lt;include&amp;gt; elements (e.g. / file = "batch_taskorder1.iqx") are not executing. &lt;br/&gt;&lt;br/&gt;When I run the above &amp;lt;include&amp;gt; script, it extracts elements from the appropriate &amp;lt;batch&amp;gt; script, however the &amp;lt;batch&amp;gt; script does not run. &lt;br/&gt;&lt;br/&gt;When I reference an individual task script in the &amp;lt;include&amp;gt; element as you said in your last post (&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;https://www.millisecond.com/forums/Topic19661.aspx#bm19667)&lt;/a&gt;&lt;/a&gt; it works, however due to the way I am counterbalancing I need it to reference a batch script. &lt;br/&gt;&lt;br/&gt;Any thoughts on this? I've attached the &amp;lt;include&amp;gt; script (start_script_include) and the batch scripts for reference.&lt;br/&gt;&lt;br/&gt;Thanks once again!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21576"&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;Sorry, you can't &amp;lt;include&amp;gt; &amp;lt;batch&amp;gt;-scripts. &amp;lt;batch&amp;gt; scripts work somewhat differently than regular / "actual" scripts -- they control the execution of regular scripts -- and hence run in a different "control thread" if you will. You basically can't start (another) such control thread once you're in the "regular" script execution thread, which is where "start_script_include.iqx" is executed.&lt;br/&gt;&lt;br/&gt;I know this is frustrating.&lt;br/&gt;&lt;br/&gt;Going back to your 2nd post ( &lt;a href="https://www.millisecond.com/forums/FindPost21536.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost21536.aspx"&gt;https://www.millisecond.com/forums/FindPost21536.aspx&lt;/a&gt;&lt;/a&gt; ), your concern was that you couldn't use the groupnumber for &amp;lt;batch&amp;gt; condition assignment because one of the scripts run by the &amp;lt;batch&amp;gt; elements also relies on the groupnumber to counterbalance block order. It is not strictly true that this precludes using groupnumber in &amp;lt;batch&amp;gt;es. You can put &lt;br/&gt;&lt;br/&gt;// order 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1,2,3,4 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// order 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (5,6,7,8 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;in a single batch script file. This will ensure that the scripts run by the respective batches *also* get varying groupnumbers and hence can counterbalance blocks and the like based on the groupnumber. More on how condition assignment works mathematically is here: &lt;a href="https://www.millisecond.com/forums/Topic13856.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/Topic13856.aspx"&gt;https://www.millisecond.com/forums/Topic13856.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Would that approach help / solve the problem?&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21579"&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;Ok that's a shame - I thought I nearly had it there! &lt;br/&gt;&lt;br/&gt;I'm not sure that solution would work - I've attached my counterbalancing sheet with the issues I will have if I try to counterbalance one of my tasks (Task2) with a sequential groupnumber - effectively I've got 8 different conditions (looking at the combinations of Task_order and Task2_version in the sheet) with 6 participants in each condition.&lt;br/&gt;&lt;br/&gt;I could write 8 different batch files&amp;nbsp;&lt;br/&gt;&lt;br/&gt;// Task_order_1 Task2_Version1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1,2,3,4,5,6 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;/ file = "Task2_version1.iqx"&lt;br/&gt;/ file = "Task3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// Task_order_2 Task2_Version1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (7,8,9,10,11,12 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;&lt;span style="font-size: 13.3333px;"&gt;/ file = "Task3.iqx"&lt;br/&gt;&lt;/span&gt;/ file = "Task2_version1.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// Task_order_1 Task2_Version2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (13,14,15,16,17,18 of 48)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "Task1.iqx"&lt;br/&gt;&lt;span style="font-size: 13.3333px;"&gt;/ file = "Task2_version2.iqx"&lt;br/&gt;&lt;/span&gt;/ file = "Task3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;etc... but then I'd be worried that if for some reason one administration of the web experiment didn't work/crashed and had to be done again, the subsequent groupnumber (i.e. the groupnumber on readministration of the task) would &amp;nbsp;not match up with the appropriate counterbalancing groupnumber (as it would be &amp;nbsp;correct groupnumber +1) - is this correct?&lt;br/&gt;&lt;br/&gt;As a result I've decided to go for the manual option and pass the appropriate groupnumber for Task2 (read from the counterbalancing sheet) through the URL parameter on the web script.&lt;br/&gt;&lt;br/&gt;Thanks for all of your help.&amp;nbsp;</description><pubDate>Thu, 11 May 2017 23:35:26 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21579.aspx</link><description>&lt;div data-id="21576" class="if-quote-wrapper" unselectable="on" data-guid="1494564174406"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21576" 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="21576" 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="21576" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21576"&gt;&lt;div class="if-quote-message-margin"&gt;Thanks Dave, &lt;br/&gt;&lt;br/&gt;I should have said that I had tried that method, however due to the limitations you mentioned here&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;https://www.millisecond.com/forums/Topic8594.aspx#bm8598&lt;/a&gt;&lt;/a&gt; with the include element being overwhelmed (I think in this case by too many expressions in the /precondition attribute, i.e. around 60 script.subjectid == "xxxx" expressions).&lt;br/&gt;&lt;br/&gt;Please disregard my last post as I've now worked around these limitations by splitting the number of /precondition expressions into another include element i.e:&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;This is all working well now, however I've encountered another problem: the &amp;lt;batch&amp;gt; scripts that are referenced from the &amp;lt;include&amp;gt; elements (e.g. / file = "batch_taskorder1.iqx") are not executing. &lt;br/&gt;&lt;br/&gt;When I run the above &amp;lt;include&amp;gt; script, it extracts elements from the appropriate &amp;lt;batch&amp;gt; script, however the &amp;lt;batch&amp;gt; script does not run. &lt;br/&gt;&lt;br/&gt;When I reference an individual task script in the &amp;lt;include&amp;gt; element as you said in your last post (&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;https://www.millisecond.com/forums/Topic19661.aspx#bm19667)&lt;/a&gt;&lt;/a&gt; it works, however due to the way I am counterbalancing I need it to reference a batch script. &lt;br/&gt;&lt;br/&gt;Any thoughts on this? I've attached the &amp;lt;include&amp;gt; script (start_script_include) and the batch scripts for reference.&lt;br/&gt;&lt;br/&gt;Thanks once again!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21576"&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;Sorry, you can't &amp;lt;include&amp;gt; &amp;lt;batch&amp;gt;-scripts. &amp;lt;batch&amp;gt; scripts work somewhat differently than regular / "actual" scripts -- they control the execution of regular scripts -- and hence run in a different "control thread" if you will. You basically can't start (another) such control thread once you're in the "regular" script execution thread, which is where "start_script_include.iqx" is executed.&lt;br/&gt;&lt;br/&gt;I know this is frustrating.&lt;br/&gt;&lt;br/&gt;Going back to your 2nd post ( &lt;a href="https://www.millisecond.com/forums/FindPost21536.aspx"&gt;https://www.millisecond.com/forums/FindPost21536.aspx&lt;/a&gt; ), your concern was that you couldn't use the groupnumber for &amp;lt;batch&amp;gt; condition assignment because one of the scripts run by the &amp;lt;batch&amp;gt; elements also relies on the groupnumber to counterbalance block order. It is not strictly true that this precludes using groupnumber in &amp;lt;batch&amp;gt;es. You can put &lt;br/&gt;&lt;br/&gt;// order 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1,2,3,4 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// order 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (5,6,7,8 of 8)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;in a single batch script file. This will ensure that the scripts run by the respective batches *also* get varying groupnumbers and hence can counterbalance blocks and the like based on the groupnumber. More on how condition assignment works mathematically is here: &lt;a href="https://www.millisecond.com/forums/Topic13856.aspx"&gt;https://www.millisecond.com/forums/Topic13856.aspx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Would that approach help / solve the problem?&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 11 May 2017 22:08:05 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21576.aspx</link><description>Thanks Dave, &lt;br/&gt;&lt;br/&gt;I should have said that I had tried that method, however due to the limitations you mentioned here&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic8594.aspx#bm8598"&gt;https://www.millisecond.com/forums/Topic8594.aspx#bm8598&lt;/a&gt; with the include element being overwhelmed (I think in this case by too many expressions in the /precondition attribute, i.e. around 60 script.subjectid == "xxxx" expressions).&lt;br/&gt;&lt;br/&gt;Please disregard my last post as I've now worked around these limitations by splitting the number of /precondition expressions into another include element i.e:&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752"... the other 30 elements]&lt;br/&gt;/ file = "batch_taskorder2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;This is all working well now, however I've encountered another problem: the &amp;lt;batch&amp;gt; scripts that are referenced from the &amp;lt;include&amp;gt; elements (e.g. / file = "batch_taskorder1.iqx") are not executing. &lt;br/&gt;&lt;br/&gt;When I run the above &amp;lt;include&amp;gt; script, it extracts elements from the appropriate &amp;lt;batch&amp;gt; script, however the &amp;lt;batch&amp;gt; script does not run. &lt;br/&gt;&lt;br/&gt;When I reference an individual task script in the &amp;lt;include&amp;gt; element as you said in your last post (&lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667)"&gt;https://www.millisecond.com/forums/Topic19661.aspx#bm19667)&lt;/a&gt; it works, however due to the way I am counterbalancing I need it to reference a batch script. &lt;br/&gt;&lt;br/&gt;Any thoughts on this? I've attached the &amp;lt;include&amp;gt; script (start_script_include) and the batch scripts for reference.&lt;br/&gt;&lt;br/&gt;Thanks once again!&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 11 May 2017 18:14:44 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21573.aspx</link><description>&lt;div data-id="21572" class="if-quote-wrapper" unselectable="on" data-guid="1494542521923"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21572" 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="21572" 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="21572" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Thursday, May 11, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21572"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;br/&gt;Hi again Dave,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm still having a bit of trouble with the script, this is my main launch script:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ subIDtrialorder1 = ",1752,3693,3624,5341,1728,9525,7814,5745,5978,5269,9582,3427,6822,8275,6824,3425,9234,8263,6894,3455,6742,8579,3852,9213,1632,9263,5926,3641,7642,4835,2894,1367,7618,7963,2976,5923,4826,2641,7132,6527,6214,3147,5792,4397,4692,4721,6294,3783,9232,9165,3762,5191,2752,5713,5692,7263,2358,5623,9624,9527,"&lt;br/&gt;&lt;br/&gt;/ subIDtrialorder2 = ",6952,9635,9168,8439,5982,2875,9846,7481,1726,4953,7344,9637,8432,7153,7896,1753,7984,3525,8922,1829,8394,3879,5946,1345,4974,9385,6974,6931,6534,1897,4532,1835,7264,8567,8572,3811,4828,6251,9612,5237,7416,6739,8244,3753,1256,5239,7314,8755,2632,8379,1784,1561,1872,4697,4728,4839,9622,8731,2384,5297,"&lt;br/&gt;/ normalizedid = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ normalizedid = values.normalizedid = toupper(concat(concat(",", script.subjectid), ","));&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt; &lt;br/&gt;/ precondition = [if(contains(values.subIDtrialorder1, values.normalizedid)), file = "batch_taskorder1.iqx"]&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [if(contains(values.subIDtrialorder2, values.normalizedid)), file = "batch_taskorder2.iqx"]&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;However when I run it it says "Expression 'values.subIDtaskorder1' is invalid. Expression contains an unknown element or property name" - any thoughts on why this may be?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks again,&lt;br/&gt;&lt;br/&gt;Ben&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21572"&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;For one thing, the syntax in your &amp;lt;include&amp;gt; elements is invalid. That, however, is ultimately irrelevant because you can't use &amp;lt;expressions&amp;gt; or &amp;lt;values&amp;gt; in an &amp;lt;include&amp;gt;'s /precondition. What &amp;lt;include&amp;gt; effectively does is paste the contents of one file into another. &amp;lt;include&amp;gt; is parsed (and has to be) pretty much at the very start, *before* any other elements such as &amp;lt;expressions&amp;gt; or &amp;lt;values&amp;gt;, i.e. its /precondition does not "know" about those.&lt;br/&gt;&lt;br/&gt;You'll have to reformulate as show in the post I linked earlier ( &lt;a href="https://www.millisecond.com/forums/Topic19661.aspx#bm19667"&gt;https://www.millisecond.com/forums/Topic19661.aspx#bm19667&lt;/a&gt; ), i.e. the first &amp;lt;include&amp;gt; should read&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "1752" || script.subjectid == "3693" || script.subjectid == "3624" || ...]&lt;br/&gt;/ file = "batch_taskorder1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;and the one for ""batch_taskorder2.iqx" analogously.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 11 May 2017 15:57:15 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title /><link>https://forums.millisecond.com/Topic21572.aspx</link><description>&lt;div data-id="21560" class="if-quote-wrapper" unselectable="on"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21560" 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="21560" 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="21560" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Wednesday, May 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21560"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21541" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21541" 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="21541" 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="21541" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, May 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21541"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21536" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21536" 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="21536" 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="21536" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21536"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21531" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21531" 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="21531" 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="21531" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21531"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21530" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21530" 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="21530" 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="21530" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21530"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben&lt;a class="if-quote-goto quote-link" href="#" data-id="21530"&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;Not sure I entirely understand the question / the intent, but this thread might be useful: &lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;https://www.millisecond.com/forums/FindPost19667.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this one, too: &lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;https://www.millisecond.com/forums/FindPost17599.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I'd probably need a little more context such as what you would ultimately want to do with the re-assigned groupnumber (which isn't really the groupnumber).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21531"&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 for the reply Dave, those threads are helpful although I'm doing something slightly different - In one of my tasks I have 4 different run conditions:&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order1]&lt;br/&gt;/ subjects = (1 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order2]&lt;br/&gt;/ subjects = (2 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order3]&lt;br/&gt;/ subjects = (3 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order4]&lt;br/&gt;/ subjects = (4 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;However, the way I have set up the batch file with other tasks in the experiment means that I need to counterbalance the block order within this individual task script.&lt;br/&gt;&lt;br/&gt;As a result I want to change groupnumber depending on specific subject ID's (e.g if subID == matches any subject ID in list A of subID's then groupnumber = 1, &lt;br/&gt;else subID == matches any subject ID in list B of subID's then groupnumber = &amp;nbsp;2 etc...) such that this task runs with particular counterbalancing rules.&lt;br/&gt;&lt;br/&gt;Hope this makes sense, thanks for your help.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21536"&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;Okay, thanks. That's not possible -- you cannot re-assign or change the groupnumber once the thing has started, and specifically you can't do condition assignment based on a &amp;lt;value&amp;gt; like that.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21541"&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;No worries, I've ended up using the solution in the first link you had provided by creating a few helper scripts with the element &amp;lt;include&amp;gt; /precondition.&lt;br/&gt;&lt;br/&gt;Thanks for your help Dave.&lt;a class="if-quote-goto quote-link" href="#" data-id="21560"&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;Hi again Dave,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm still having a bit of trouble with the script, this is my main launch script:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ subIDtrialorder1 = ",1752,3693,3624,5341,1728,9525,7814,5745,5978,5269,9582,3427,6822,8275,6824,3425,9234,8263,6894,3455,6742,8579,3852,9213,1632,9263,5926,3641,7642,4835,2894,1367,7618,7963,2976,5923,4826,2641,7132,6527,6214,3147,5792,4397,4692,4721,6294,3783,9232,9165,3762,5191,2752,5713,5692,7263,2358,5623,9624,9527,"&lt;br/&gt;&lt;br/&gt;/ subIDtrialorder2 = ",6952,9635,9168,8439,5982,2875,9846,7481,1726,4953,7344,9637,8432,7153,7896,1753,7984,3525,8922,1829,8394,3879,5946,1345,4974,9385,6974,6931,6534,1897,4532,1835,7264,8567,8572,3811,4828,6251,9612,5237,7416,6739,8244,3753,1256,5239,7314,8755,2632,8379,1784,1561,1872,4697,4728,4839,9622,8731,2384,5297,"&lt;br/&gt;/ normalizedid = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ normalizedid = values.normalizedid = toupper(concat(concat(",", script.subjectid), ","));&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt; &lt;br/&gt;/ precondition = [if(contains(values.subIDtrialorder1, values.normalizedid)), file = "batch_taskorder1.iqx"]&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [if(contains(values.subIDtrialorder2, values.normalizedid)), file = "batch_taskorder2.iqx"]&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;However when I run it it says "Expression 'values.subIDtaskorder1' is invalid. Expression contains an unknown element or property name" - any thoughts on why this may be?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks again,&lt;br/&gt;&lt;br/&gt;Ben&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 11 May 2017 15:31:11 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21560.aspx</link><description>&lt;div data-id="21541" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21541" 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="21541" 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="21541" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, May 10, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21541"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21536" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21536" 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="21536" 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="21536" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21536"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21531" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21531" 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="21531" 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="21531" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21531"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21530" class="if-quote-wrapper" unselectable="on" data-guid="1494472423979"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21530" 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="21530" 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="21530" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21530"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben&lt;a class="if-quote-goto quote-link" href="#" data-id="21530"&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;Not sure I entirely understand the question / the intent, but this thread might be useful: &lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;https://www.millisecond.com/forums/FindPost19667.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this one, too: &lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;https://www.millisecond.com/forums/FindPost17599.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I'd probably need a little more context such as what you would ultimately want to do with the re-assigned groupnumber (which isn't really the groupnumber).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21531"&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 for the reply Dave, those threads are helpful although I'm doing something slightly different - In one of my tasks I have 4 different run conditions:&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order1]&lt;br/&gt;/ subjects = (1 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order2]&lt;br/&gt;/ subjects = (2 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order3]&lt;br/&gt;/ subjects = (3 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order4]&lt;br/&gt;/ subjects = (4 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;However, the way I have set up the batch file with other tasks in the experiment means that I need to counterbalance the block order within this individual task script.&lt;br/&gt;&lt;br/&gt;As a result I want to change groupnumber depending on specific subject ID's (e.g if subID == matches any subject ID in list A of subID's then groupnumber = 1, &lt;br/&gt;else subID == matches any subject ID in list B of subID's then groupnumber = &amp;nbsp;2 etc...) such that this task runs with particular counterbalancing rules.&lt;br/&gt;&lt;br/&gt;Hope this makes sense, thanks for your help.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21536"&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;Okay, thanks. That's not possible -- you cannot re-assign or change the groupnumber once the thing has started, and specifically you can't do condition assignment based on a &amp;lt;value&amp;gt; like that.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21541"&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;No worries, I've ended up using the solution in the first link you had provided by creating a few helper scripts with the element &amp;lt;include&amp;gt; /precondition.&lt;br/&gt;&lt;br/&gt;Thanks for your help Dave.</description><pubDate>Wed, 10 May 2017 20:29:07 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21541.aspx</link><description>&lt;div data-id="21536" class="if-quote-wrapper" unselectable="on" data-guid="1494429573005"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21536" 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="21536" 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="21536" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21536"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21531" class="if-quote-wrapper" unselectable="on" data-guid="1494429573005"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21531" 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="21531" 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="21531" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21531"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21530" class="if-quote-wrapper" unselectable="on" data-guid="1494429573005"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21530" 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="21530" 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="21530" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21530"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben&lt;a class="if-quote-goto quote-link" href="#" data-id="21530"&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;Not sure I entirely understand the question / the intent, but this thread might be useful: &lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;https://www.millisecond.com/forums/FindPost19667.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this one, too: &lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;https://www.millisecond.com/forums/FindPost17599.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I'd probably need a little more context such as what you would ultimately want to do with the re-assigned groupnumber (which isn't really the groupnumber).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21531"&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 for the reply Dave, those threads are helpful although I'm doing something slightly different - In one of my tasks I have 4 different run conditions:&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order1]&lt;br/&gt;/ subjects = (1 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order2]&lt;br/&gt;/ subjects = (2 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order3]&lt;br/&gt;/ subjects = (3 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order4]&lt;br/&gt;/ subjects = (4 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;However, the way I have set up the batch file with other tasks in the experiment means that I need to counterbalance the block order within this individual task script.&lt;br/&gt;&lt;br/&gt;As a result I want to change groupnumber depending on specific subject ID's (e.g if subID == matches any subject ID in list A of subID's then groupnumber = 1, &lt;br/&gt;else subID == matches any subject ID in list B of subID's then groupnumber = &amp;nbsp;2 etc...) such that this task runs with particular counterbalancing rules.&lt;br/&gt;&lt;br/&gt;Hope this makes sense, thanks for your help.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21536"&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;Okay, thanks. That's not possible -- you cannot re-assign or change the groupnumber once the thing has started, and specifically you can't do condition assignment based on a &amp;lt;value&amp;gt; like that.&lt;br/&gt;</description><pubDate>Wed, 10 May 2017 08:23:02 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21536.aspx</link><description>&lt;div data-id="21531" class="if-quote-wrapper" unselectable="on" data-guid="1494391171318"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21531" 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="21531" 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="21531" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21531"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21530" class="if-quote-wrapper" unselectable="on" data-guid="1494391171318"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21530" 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="21530" 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="21530" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21530"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben&lt;a class="if-quote-goto quote-link" href="#" data-id="21530"&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;Not sure I entirely understand the question / the intent, but this thread might be useful: &lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;https://www.millisecond.com/forums/FindPost19667.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this one, too: &lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;https://www.millisecond.com/forums/FindPost17599.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I'd probably need a little more context such as what you would ultimately want to do with the re-assigned groupnumber (which isn't really the groupnumber).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21531"&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 for the reply Dave, those threads are helpful although I'm doing something slightly different - In one of my tasks I have 4 different run conditions:&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order1]&lt;br/&gt;/ subjects = (1 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [e.g. block_order2]&lt;br/&gt;/ subjects = (2 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order3]&lt;br/&gt;/ subjects = (3 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (generalintro)&lt;br/&gt;/ postinstructions = (generaloutro)&lt;br/&gt;/ blocks = [block_order4]&lt;br/&gt;/ subjects = (4 of 4)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/onexptend = [values.completed = 1]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;However, the way I have set up the batch file with other tasks in the experiment means that I need to counterbalance the block order within this individual task script.&lt;br/&gt;&lt;br/&gt;As a result I want to change groupnumber depending on specific subject ID's (e.g if subID == matches any subject ID in list A of subID's then groupnumber = 1, &lt;br/&gt;else subID == matches any subject ID in list B of subID's then groupnumber = &amp;nbsp;2 etc...) such that this task runs with particular counterbalancing rules.&lt;br/&gt;&lt;br/&gt;Hope this makes sense, thanks for your help.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 09 May 2017 22:02:22 GMT</pubDate><dc:creator>cast0095</dc:creator></item><item><title>RE: Assigning group number using subject ID</title><link>https://forums.millisecond.com/Topic21531.aspx</link><description>&lt;div data-id="21530" class="if-quote-wrapper" unselectable="on" data-guid="1494388091270"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21530" 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="21530" 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="21530" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;cast0095 - Tuesday, May 9, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21530"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&amp;nbsp;&lt;br/&gt;I'm quite new to Inquisit and I was wondering if I could (re)assign group number at the start of an experiment using specific subject ID's contained in a list:&lt;br/&gt;&lt;br/&gt;Define two lists of specific subject ID's&lt;br/&gt;&amp;lt;list subID_A&amp;gt;&lt;br/&gt;/ items = (2345, 4456, 6458, 6855)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list subID_B&amp;gt;&lt;br/&gt;/items = (1243, 5697, 8096, 9054)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;But now is the part I'm not sure on as I don't think there is an 'any()' function in Inquisit&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/if(groupnumber == any(subID_A))&lt;br/&gt;/groupnumber = 1&lt;br/&gt;/then(groupnumber == any(subID_B))&lt;br/&gt;/groupnumber = 2&lt;br/&gt;/else&lt;br/&gt;/groupnumber = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be greatly appreciated!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ben&lt;a class="if-quote-goto quote-link" href="#" data-id="21530"&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;Not sure I entirely understand the question / the intent, but this thread might be useful: &lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;&lt;a href="https://www.millisecond.com/forums/FindPost19667.aspx"&gt;https://www.millisecond.com/forums/FindPost19667.aspx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Perhaps this one, too: &lt;a href="https://www.millisecond.com/forums/FindPost17599.aspx"&gt;https://www.millisecond.com/forums/FindPost17599.aspx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Beyond that, I'd probably need a little more context such as what you would ultimately want to do with the re-assigned groupnumber (which isn't really the groupnumber).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 09 May 2017 20:54:49 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>