Millisecond Forums

Integrate an item into a sentence

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

By Coati - 3/11/2016

Dear all,

as soon as one problem is solved, another one pops up. Sorry for being such a noob, I hope this is my last one for a longer time.

In my experiment I want the name of each participant (given at the beginning) occuring in further tasks. I already figured out, how to extract the name from a survey page to use it as an item in further tasks (Inquisits "How to Prestent Stimuli provided by Subjects"). Now I want to inegrate the specific name into a text element.

Here is an exemplary script:

<item Ben>
/1 = "Ben"
</item>

<text cond>
 /items = ("Would ___ consider me as")
 /select   = noreplace
 /position = (50, 45)
 /txcolor  = (0, 0, 0)
 </text>

I used a fixed item name to simplify a little bit. In the actual experiment it will be the name of the participant. Now the name should appear at the position I marked with ___. I already tried to put the item into <% %> to refer to it, but this didn't work. So what could I do?

Again: Thanks a lot, I really appreciate your help!

Jakob.
By Dave - 3/11/2016

The proper syntax to pipe the <item> element's 1st (and here:only) item into the <text> element's item is:

<item Ben>
/1 = "Ben"
</item>

<text cond>
 /items = ("Would <%item.ben.item(1)%> consider me as")
 /select   = noreplace
 /position = (50, 45)
 /txcolor  = (0, 0, 0)
 </text>