How may I save the numbers of the presented items?


Author
Message
july1810
july1810
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 28, Visits: 213
Hello,
I have an item element that contains 20 phrases, which are randomly presented. Under the condition that the subject gives a certain response I would like to store the numbers of the presented items in another item element. However, I cannot find how to address the item number. This is my code so far...

/ ontrialend = [if (response == "5" || "6" || "7") item.Response.insertitem(item.myitem.XXX,1)]

Thank you very much for your help.
Best Julia
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
An <item> element doesn't do any selection. It merely stores items. As such it does not have anything like a "current item" it could tell you.

You need to access the property of the element that actually does the selection, here the <text> element that *uses* the items defined in your <item> element. It will tell you the currently selected item via its currentitem property.

july1810
july1810
Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)Distinguished Member (3K reputation)
Group: Forum Members
Posts: 28, Visits: 213
Thank you for your answer, but apparently I asked the wrong question because it does not help me =(
Here is what I want to do: I have 20 Stimuli stored in an item that shall be presented in a random order. So far everything works fine. However I have a second Item also containing 20 Stimuli that are one-to-one matches to the Stimuli in the first Item. What I like inquisit to do, is to present the matching stimulus from the second list in case the answer to the corresponding stimulus from the first list is correct. But I'm stuck with the assignment.
I would appreciate it very much, if you could help me on this one.
Best
Julia
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
<block myblock>
/ trials = [1-3=showtxt1]
</block>

<trial showtxt1>
/ stimulusframes = [1=txt1]
/ validresponse = (30, 48, 46)
/ iscorrectresponse = [trial.showtxt1.response == list.resplist.nextvalue]
/ branch = [if (trial.showtxt1.correct) trial.showtxt2]
</trial>

<trial showtxt2>
/ stimulusframes = [1=txt2]
/ trialduration = 2000
</trial>

<text txt1>
/ items = ("A1", "B1", "C1")
</text>

*** Scan codes for a, b and c ***
<list resplist>
/ items = (30,48,46)
/ selectionmode = text.txt1.currentindex
</list>

<text txt2>
/ items = ("A2", "B2", "C2")
/ select = text.txt1.currentindex
</text>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search