﻿<?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 6  » Define correct answers in</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sat, 06 Jun 2026 13:05:50 GMT</lastBuildDate><ttl>20</ttl><item><title>Define correct answers in</title><link>https://forums.millisecond.com/Topic34592.aspx</link><description>Hey,&lt;br/&gt;&lt;br/&gt;I have an experiment where I want to have users decide between 1, 2 or 3 (keyboard input). If they decide for a specific number (either 1 or 3), they should get a message of being correct or incorrect. If they decide for number 2, they should see another trial. This works fine so far, but now I want to specify the correct (and incorrect) numbers using a list. Unfortunately, it doesn't work and the correct number is not assigned in my data either.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Here is the code: (copied the relevant parts only):&lt;br/&gt;&lt;br/&gt;&amp;lt;item item_correct_answers&amp;gt;&lt;br/&gt;/1 = "1"&lt;br/&gt;/2 = "3"&lt;br/&gt;/3 = "1"&lt;br/&gt;/4 = "3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = [item.item_correct_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item item_incorrect_answers&amp;gt;&lt;br/&gt;/1 = "3"&lt;br/&gt;/2 = "1"&lt;br/&gt;/3 = "3"&lt;br/&gt;/4 = "1"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list incorrect_answers&amp;gt;&lt;br/&gt;/ items = [item.item_incorrect_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ currentscenario = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial task_70&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction, stimulus_70, orangeChoice, blueChoice, automationChoice, press_1, press_2, press_3]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = (list.correct_answers.currentvalue)&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsetrial = ("2", task_70_advice)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;  values.currentscenario = values.currentscenario + 1;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block task&amp;gt;&lt;br/&gt;/ trials = [1-4 = sequence(task_70)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;&amp;nbsp; &amp;nbsp; 1 = task;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thanks in advance!</description><pubDate>Mon, 01 Aug 2022 13:09:11 GMT</pubDate><dc:creator>L123</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34598.aspx</link><description>Works perfectly! Thank you so much!</description><pubDate>Mon, 01 Aug 2022 13:09:11 GMT</pubDate><dc:creator>L123</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34597.aspx</link><description>&lt;blockquote data-id="34596" class="if-quote-wrapper" unselectable="on" data-guid="1659357204973" id="if_insertedNode_1659357203426" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="34596" 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="34596" 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="34596" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;L123 - 8/1/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-34596"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Thank you!&lt;br/&gt;Below you can find a small demo that runs. What I want to do is iterate over a list with different answers. Participants have to choose between A or B. In the first trial, A is correct, in the second trial, B is correct (and so on - that is subject to change in the future). They can also request advice. Now the advice also iterates over a list of items. However, I cannot set the correct and incorrect responses (with corresponding response message) based on the current trial / list. The iteration of advice works for each trial, but setting the correct answers and response message and incorrect answers and response message for the current trial does not work.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// define correct answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_correct_answers&amp;gt;&lt;br/&gt;/ 1 = "1"&lt;br/&gt;/ 2 = "3"&lt;br/&gt;/ 3 = "1"&lt;br/&gt;/ 4 = "3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define the correct answers, as of now in a list element&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = (1, 3, 1, 3)&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//  define incorrect answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_incorrect_answers&amp;gt;&lt;br/&gt;/ 1 = "3"&lt;br/&gt;/ 2 = "1"&lt;br/&gt;/ 3 = "3"&lt;br/&gt;/ 4 = "1"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define the incorrect answers, as of now in a list element&lt;br/&gt;&amp;lt;list incorrect_answers&amp;gt;&lt;br/&gt;/ items = [item.item_incorrect_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// define texts&lt;br/&gt;&amp;lt;text fixation&amp;gt;&lt;br/&gt;/items = ("+")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_correct&amp;gt;&lt;br/&gt;/items = ("Correct!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_incorrect&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Ask participants to press either 1 or 3 on their keyboard, if they want help, they should press 2&lt;br/&gt;&amp;lt;text instruction&amp;gt;&lt;br/&gt;/ items = ("A (Press 1) or B (Press 3)? If you want support, press 2") &lt;br/&gt;/ fontstyle = ("Arial", 4%) &lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ txbgcolor = white &lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Override the fixation with a white screen&lt;br/&gt;&amp;lt;shape override_fixation&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ color = (255,255,255)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;// specify advice&lt;br/&gt;&amp;lt;item advice_answer_text&amp;gt;&lt;br/&gt;/1 = "Advice: 1"&lt;br/&gt;/2 = "Advice: 3"&lt;br/&gt;/3 = "Advice: 1"&lt;br/&gt;/4 = "Advice: 3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// provide advice&lt;br/&gt;&amp;lt;text advice_answer&amp;gt;&lt;br/&gt;/ items = advice_answer_text&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;/ fontstyle = ("Arial", 5%) &lt;br/&gt;/ position = (50%, 75%)&lt;br/&gt;/ size = (32%, 15%)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ txcolor = white&lt;br/&gt;/ txbgcolor = grey &lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// define data to be recorded&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (build, computer.platform, date, time, subject, group, session, &lt;br/&gt;blockcode, blocknum, trialcode, trialnum, list.correct_answers.currentvalue, response, latency, correct)&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;// define values&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ currentscenario = 0&lt;br/&gt;&amp;lt;/values&amp;gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// In this practice trial, I can define the correct answers. 1 is correct, 1 gives the "correct" Feedback and 3 gives the "incorrect" feedback. However, the correct response might  change in other trials (to be B, so 3, for example)&lt;br/&gt;&amp;lt;trial practice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = ("1")&lt;br/&gt;/ responsemessage = ("1", feedback_correct, 0)&lt;br/&gt;/ responsemessage = ("3", feedback_incorrect, 0)&lt;br/&gt;/ posttrialpause = 1500&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// this code works, but it does not give the "feedback_correct" or "feedback_incorrect" response and also does not code the correctresponse in the data section&lt;br/&gt;&amp;lt;trial task_70&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = (list.correct_answers.currentvalue)&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsetrial = ("2", task_70_advice)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;  values.currentscenario = values.currentscenario + 1;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// if participants wanted to get advice (pressed 2 in the other trial), they can get advice here and choose again. However, it does not correctly code correct/incorrect either&lt;br/&gt;&amp;lt;trial task_70_advice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = override_fixation, instruction, advice_answer]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "3")&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// define blocks&lt;br/&gt;&amp;lt;block practice_task&amp;gt;&lt;br/&gt;/ trials = [1 = practice]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block task&amp;gt;&lt;br/&gt;/ trials = [1-4 = sequence(task_70)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// define experiment&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 = practice_task;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2 = task;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="34596"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;I don't see any need to use lists here at all. The simplest way to get this working properly based on what you have is this:&lt;br/&gt;&lt;br/&gt;[code]// define correct answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_correct_answers&amp;gt;&lt;br/&gt;/ 1 = "1"&lt;br/&gt;/ 2 = "3"&lt;br/&gt;/ 3 = "1"&lt;br/&gt;/ 4 = "3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define incorrect answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_incorrect_answers&amp;gt;&lt;br/&gt;/ 1 = "3"&lt;br/&gt;/ 2 = "1"&lt;br/&gt;/ 3 = "3"&lt;br/&gt;/ 4 = "1"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define texts&lt;br/&gt;&amp;lt;text fixation&amp;gt;&lt;br/&gt;/items = ("+")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_correct&amp;gt;&lt;br/&gt;/items = ("Correct!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_incorrect&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Ask participants to press either 1 or 3 on their keyboard, if they want help, they should press 2&lt;br/&gt;&amp;lt;text instruction&amp;gt;&lt;br/&gt;/ items = ("A (Press 1) or B (Press 3)? If you want support, press 2")&lt;br/&gt;/ fontstyle = ("Arial", 4%)&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Override the fixation with a white screen&lt;br/&gt;&amp;lt;shape override_fixation&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ color = (255,255,255)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;// specify advice&lt;br/&gt;&amp;lt;item advice_answer_text&amp;gt;&lt;br/&gt;/1 = "Advice: 1"&lt;br/&gt;/2 = "Advice: 3"&lt;br/&gt;/3 = "Advice: 1"&lt;br/&gt;/4 = "Advice: 3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// provide advice&lt;br/&gt;&amp;lt;text advice_answer&amp;gt;&lt;br/&gt;/ items = advice_answer_text&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;/ fontstyle = ("Arial", 5%)&lt;br/&gt;/ position = (50%, 75%)&lt;br/&gt;/ size = (32%, 15%)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ txcolor = white&lt;br/&gt;/ txbgcolor = grey&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// define data to be recorded&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (build, computer.platform, date, time, subject, group, session,&lt;br/&gt;blockcode, blocknum, trialcode, trialnum, values.incorrectanswer, values.correctanswer, responsetext, latency, correct)&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;// define values&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ currentscenario = 0&lt;br/&gt;/ correctanswer = " "&lt;br/&gt;/ incorrectanswer = " "&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// In this practice trial, I can define the correct answers. 1 is correct, 1 gives the "correct" Feedback and 3 gives the "incorrect" feedback. However, the correct response might change in other trials (to be B, so 3, for example)&lt;br/&gt;&amp;lt;trial practice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = ("1")&lt;br/&gt;/ responsemessage = ("1", feedback_correct, 0)&lt;br/&gt;/ responsemessage = ("3", feedback_incorrect, 0)&lt;br/&gt;/ posttrialpause = 1500&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// this code works, but it does not give the "feedback_correct" or "feedback_incorrect" response and also does not code the correctresponse in the data section&lt;br/&gt;&amp;lt;trial task_70&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = (values.correctanswer) // correct answer is pressing the correct key as stored in values.correctanswer&lt;br/&gt;/ responsemessage = (values.correctanswer, feedback_correct, 1500) // give correct feedback&lt;br/&gt;/ responsetrial = ("2", task_70_advice)&lt;br/&gt;/ responsemessage = (values.incorrectanswer, feedback_incorrect, 1500) // give error feedback&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;  values.currentscenario = values.currentscenario + 1;&lt;br/&gt;  // store correct key for the current scenario in a variable&lt;br/&gt;  values.correctanswer = item.item_correct_answers.item(values.currentscenario);&lt;br/&gt;  // store incorrect key for the current scenario in a variable&lt;br/&gt;  values.incorrectanswer = item.item_incorrect_answers.item(values.currentscenario);&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// if participants wanted to get advice (pressed 2 in the other trial), they can get advice here and choose again. However, it does not correctly code correct/incorrect either&lt;br/&gt;&amp;lt;trial task_70_advice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = override_fixation, instruction, advice_answer]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "3")&lt;br/&gt;/ responsemessage = (values.correctanswer, feedback_correct, 1500) // give correct feedback&lt;br/&gt;/ responsemessage = (values.incorrectanswer, feedback_incorrect, 1500) // give error feedback&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// define blocks&lt;br/&gt;&amp;lt;block practice_task&amp;gt;&lt;br/&gt;/ trials = [1 = practice]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block task&amp;gt;&lt;br/&gt;/ trials = [1-4 = sequence(task_70)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// define experiment&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;    1 = practice_task;&lt;br/&gt;    2 = task;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/expt&amp;gt;[/code]</description><pubDate>Mon, 01 Aug 2022 12:36:19 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34596.aspx</link><description>Thank you!&lt;br/&gt;Below you can find a small demo that runs. What I want to do is iterate over a list with different answers. Participants have to choose between A or B. In the first trial, A is correct, in the second trial, B is correct (and so on - that is subject to change in the future). They can also request advice. Now the advice also iterates over a list of items. However, I cannot set the correct and incorrect responses (with corresponding response message) based on the current trial / list. The iteration of advice works for each trial, but setting the correct answers and response message and incorrect answers and response message for the current trial does not work.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// define correct answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_correct_answers&amp;gt;&lt;br/&gt;/ 1 = "1"&lt;br/&gt;/ 2 = "3"&lt;br/&gt;/ 3 = "1"&lt;br/&gt;/ 4 = "3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define the correct answers, as of now in a list element&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = (1, 3, 1, 3)&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//  define incorrect answers (would be great to use this item element for easier customization)&lt;br/&gt;&amp;lt;item item_incorrect_answers&amp;gt;&lt;br/&gt;/ 1 = "3"&lt;br/&gt;/ 2 = "1"&lt;br/&gt;/ 3 = "3"&lt;br/&gt;/ 4 = "1"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// define the incorrect answers, as of now in a list element&lt;br/&gt;&amp;lt;list incorrect_answers&amp;gt;&lt;br/&gt;/ items = [item.item_incorrect_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// define texts&lt;br/&gt;&amp;lt;text fixation&amp;gt;&lt;br/&gt;/items = ("+")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_correct&amp;gt;&lt;br/&gt;/items = ("Correct!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text feedback_incorrect&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Ask participants to press either 1 or 3 on their keyboard, if they want help, they should press 2&lt;br/&gt;&amp;lt;text instruction&amp;gt;&lt;br/&gt;/ items = ("A (Press 1) or B (Press 3)? If you want support, press 2") &lt;br/&gt;/ fontstyle = ("Arial", 4%) &lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ txbgcolor = white &lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// Override the fixation with a white screen&lt;br/&gt;&amp;lt;shape override_fixation&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ size = (30%, 30%)&lt;br/&gt;/ color = (255,255,255)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;// specify advice&lt;br/&gt;&amp;lt;item advice_answer_text&amp;gt;&lt;br/&gt;/1 = "Advice: 1"&lt;br/&gt;/2 = "Advice: 3"&lt;br/&gt;/3 = "Advice: 1"&lt;br/&gt;/4 = "Advice: 3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;// provide advice&lt;br/&gt;&amp;lt;text advice_answer&amp;gt;&lt;br/&gt;/ items = advice_answer_text&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;/ fontstyle = ("Arial", 5%) &lt;br/&gt;/ position = (50%, 75%)&lt;br/&gt;/ size = (32%, 15%)&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ txcolor = white&lt;br/&gt;/ txbgcolor = grey &lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;// define data to be recorded&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = (build, computer.platform, date, time, subject, group, session, &lt;br/&gt;blockcode, blocknum, trialcode, trialnum, list.correct_answers.currentvalue, response, latency, correct)&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;// define values&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ currentscenario = 0&lt;br/&gt;&amp;lt;/values&amp;gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;// In this practice trial, I can define the correct answers. 1 is correct, 1 gives the "correct" Feedback and 3 gives the "incorrect" feedback. However, the correct response might  change in other trials (to be B, so 3, for example)&lt;br/&gt;&amp;lt;trial practice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = ("1")&lt;br/&gt;/ responsemessage = ("1", feedback_correct, 0)&lt;br/&gt;/ responsemessage = ("3", feedback_incorrect, 0)&lt;br/&gt;/ posttrialpause = 1500&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// this code works, but it does not give the "feedback_correct" or "feedback_incorrect" response and also does not code the correctresponse in the data section&lt;br/&gt;&amp;lt;trial task_70&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = (list.correct_answers.currentvalue)&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsetrial = ("2", task_70_advice)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;  values.currentscenario = values.currentscenario + 1;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// if participants wanted to get advice (pressed 2 in the other trial), they can get advice here and choose again. However, it does not correctly code correct/incorrect either&lt;br/&gt;&amp;lt;trial task_70_advice&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = override_fixation, instruction, advice_answer]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "3")&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;// define blocks&lt;br/&gt;&amp;lt;block practice_task&amp;gt;&lt;br/&gt;/ trials = [1 = practice]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block task&amp;gt;&lt;br/&gt;/ trials = [1-4 = sequence(task_70)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// define experiment&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 = practice_task;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2 = task;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/expt&amp;gt;</description><pubDate>Mon, 01 Aug 2022 12:10:59 GMT</pubDate><dc:creator>L123</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34595.aspx</link><description>&lt;blockquote data-id="34594" class="if-quote-wrapper" unselectable="on" data-guid="1659354659819" id="if_insertedNode_1659354659084" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="34594" 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="34594" 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="34594" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;L123 - 8/1/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-34594"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Can I get it working with a textbox then?&lt;br/&gt;&lt;br/&gt;I also tried adding the correct answers directly within the list element:&lt;br/&gt;&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = ("1" "3" "1" "3")&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;It still does not work though.&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="34594"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;There are multple other issues with your code. It's not even clear what exactly it's supposed to do, since you only posted some non-runnable excerpts. Do the following:&lt;br/&gt;&lt;br/&gt;- Create a small, self-contained demo that mirrors the actual script's setup.&lt;br/&gt;- Post that code here and explain clearly what you intend it to do.&lt;br/&gt;&lt;br/&gt;Then I can show you how to do it right</description><pubDate>Mon, 01 Aug 2022 11:53:20 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34594.aspx</link><description>Can I get it working with a textbox then?&lt;br/&gt;&lt;br/&gt;I also tried adding the correct answers directly within the list element:&lt;br/&gt;&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = ("1" "3" "1" "3")&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;It still does not work though.&amp;nbsp;</description><pubDate>Mon, 01 Aug 2022 11:50:23 GMT</pubDate><dc:creator>L123</dc:creator></item><item><title>RE: Define correct answers in</title><link>https://forums.millisecond.com/Topic34593.aspx</link><description>&lt;blockquote data-id="34592" class="if-quote-wrapper" unselectable="on" data-guid="1659353477595" id="if_insertedNode_1659353476291" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="34592" 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="34592" 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="34592" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;L123 - 8/1/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-34592"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hey,&lt;br/&gt;&lt;br/&gt;I have an experiment where I want to have users decide between 1, 2 or 3 (keyboard input). If they decide for a specific number (either 1 or 3), they should get a message of being correct or incorrect. If they decide for number 2, they should see another trial. This works fine so far, but now I want to specify the correct (and incorrect) numbers using a list. Unfortunately, it doesn't work and the correct number is not assigned in my data either.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Here is the code: (copied the relevant parts only):&lt;br/&gt;&lt;br/&gt;&amp;lt;item item_correct_answers&amp;gt;&lt;br/&gt;/1 = "1"&lt;br/&gt;/2 = "3"&lt;br/&gt;/3 = "1"&lt;br/&gt;/4 = "3"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;/ items = [item.item_correct_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item item_incorrect_answers&amp;gt;&lt;br/&gt;/1 = "3"&lt;br/&gt;/2 = "1"&lt;br/&gt;/3 = "3"&lt;br/&gt;/4 = "1"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list incorrect_answers&amp;gt;&lt;br/&gt;/ items = [item.item_incorrect_answers]&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ currentscenario = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial task_70&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = fixation; 100 = override_fixation, instruction, stimulus_70, orangeChoice, blueChoice, automationChoice, press_1, press_2, press_3]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = ("1", "2", "3")&lt;br/&gt;/ correctresponse = (list.correct_answers.currentvalue)&lt;br/&gt;/ responsemessage = (list.correct_answers.currentvalue, feedback_correct, 1500)&lt;br/&gt;/ responsetrial = ("2", task_70_advice)&lt;br/&gt;/ responsemessage = (list.incorrect_answers.currentvalue, feedback_incorrect, 1500)&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;  values.currentscenario = values.currentscenario + 1;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block task&amp;gt;&lt;br/&gt;/ trials = [1-4 = sequence(task_70)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;&amp;nbsp; &amp;nbsp; 1 = task;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thanks in advance!&lt;a class="if-quote-goto quote-link" href="#" data-id="34592"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;lt;list correct_answers&amp;gt;&lt;br/&gt;&lt;strong&gt;/ items = [item.item_correct_answers]&lt;/strong&gt;&lt;br/&gt;/ select = values.currentscenario&lt;br/&gt;// select = 2&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;This is not how you define items in a list. Lists don't use &amp;lt;item&amp;gt; elements.</description><pubDate>Mon, 01 Aug 2022 11:33:26 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>