Millisecond Forums

How to Present Stimuli Provided by Subjects (Inquisit 5)

https://forums.millisecond.com/Topic25442.aspx

By AnjaK - 8/20/2018

Hi all, I'd appreciate your help with the following question:

based on the tutorial here: https://www.millisecond.com/support/docs/v5/html/howto/howtosubjectprovideditems.htm

I adapted the code (see below) for my experiment yet always get the following error message: Expression 'item.responseitems.insertitem(textbox.name.response,1)' is invalid. Expression contains an unknown function.

Does anyone know what this error refers to?

Here is my code:

<item probe>
</item>

<textbox name>
/ caption = "Bitte geben Sie Ihren Vornamen ein:"
</textbox>

<textbox nameM>
/ caption = "Bitte geben Sie den Vornamen Ihrer Mutter ein:"
</textbox>

<textbox nameV>
/ caption = "Bitte geben Sie den Vornamen Ihres Vaters ein:"
</textbox>

<textbox date>
/ caption = "Bitte geben Sie ihren Geburtstag ein (z.B. '9. April'):"
</textbox>

<textbox place>
/ caption = "Bitte geben Sie ihre Geburtsstadt ein:"
</textbox>

<surveypage page1>
/ questions = [1=name; 2=nameM; 3=nameV; 4=date; 5=place]
/ ontrialend = [item.responseitems.insertitem(textbox.name.response, 1)]
/ ontrialend = [item.responseitems.insertitem(textbox.nameM.response, 2)]
/ ontrialend = [item.responseitems.insertitem(textbox.nameV.response, 3)]
/ ontrialend = [item.responseitems.insertitem(textbox.date.response, 4)]
/ ontrialend = [item.responseitems.insertitem(textbox.place.response, 5)]
</surveypage>
By Dave - 8/20/2018

There is no <item> element called "responseitems" in the code you posted. The only <item> element you have defined is called "probe".

If you want to store the responses in

<item probe>
</item>

then your /ontrialend logic ought to read:

<surveypage page1>
/ questions = [1=name; 2=nameM; 3=nameV; 4=date; 5=place]
/ ontrialend = [item.probe.insertitem(textbox.name.response, 1)]
/ ontrialend = [item.probe.insertitem(textbox.nameM.response, 2)]
/ ontrialend = [item.probe.insertitem(textbox.nameV.response, 3)]
/ ontrialend = [item.probe.insertitem(textbox.date.response, 4)]
/ ontrialend = [item.probe.insertitem(textbox.place.response, 5)]
</surveypage>
By AnjaK - 8/20/2018

Dave - Monday, August 20, 2018
There is no <item> element called "responseitems" in the code you posted. The only <item> element you have defined is called "probe".

If you want to store the responses in

<item probe>
</item>

then your /ontrialend logic ought to read:

<surveypage page1>
/ questions = [1=name; 2=nameM; 3=nameV; 4=date; 5=place]
/ ontrialend = [item.probe.insertitem(textbox.name.response, 1)]
/ ontrialend = [item.probe.insertitem(textbox.nameM.response, 2)]
/ ontrialend = [item.probe.insertitem(textbox.nameV.response, 3)]
/ ontrialend = [item.probe.insertitem(textbox.date.response, 4)]
/ ontrialend = [item.probe.insertitem(textbox.place.response, 5)]
</surveypage>

of course, great, thank you, it works now!