element doesn't have a select or selectionmode attribute


Author
Message
Loukia
Loukia
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 22, Visits: 376
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now.



You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now. -- Just tried it now it doesn't work - error is "A parameter of result was out of range" which makes sense if only the index is supposed to go in that parenthesis. Anyway, thanks for the help, might need to live with the disappearing pictures in surveypages :) 

picture.name.item(index): "index" here merely means that the function expects a numerical value that ultimately represents a valid item number for the given <picture> element. I.e. if the give <picture> element has 10 items, then any numerical value between 1 and 10 (inclusive) will work. How that value is provided, does not really matter:

It could be

picture.name.item(list.somelist.nextvalue)

with

<list somelist>
/ items = (2,4,6,8)
</list>

or

picture.name.item(values.somevalue)

where values.somevalue has been set to a valid index number between 1 and 10.

<values>
/ somevalue  = 5
</values>

(or at runtime via /ontrialbegin = [values.somevalue = list.somelist.nextvalue])

The error you mentioned -- "A parameter of result was out of range" -- would indicate that the number you supplied is not in the valid range, e.g. if the <picture> has 10 items and you supply a value of, say, 13 you should see this kind of error.

This will hopefully allow you to determine where the mistake is.
Post Reply

Thank you Dave, yes simple lists like that work fine! Starting from a simple list helped me identify the issue actually. The problem occurs when the list elements have a /select attribute. I don't know why that is. I managed to achieve the final result by having multiple image elements and calling a list of those images in my surveypage (i.e., /questions = [1=list.images; 2=...]. This is very handy!



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: 105K
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now.



You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now. -- Just tried it now it doesn't work - error is "A parameter of result was out of range" which makes sense if only the index is supposed to go in that parenthesis. Anyway, thanks for the help, might need to live with the disappearing pictures in surveypages :) 

picture.name.item(index): "index" here merely means that the function expects a numerical value that ultimately represents a valid item number for the given <picture> element. I.e. if the give <picture> element has 10 items, then any numerical value between 1 and 10 (inclusive) will work. How that value is provided, does not really matter:

It could be

picture.name.item(list.somelist.nextvalue)

with

<list somelist>
/ items = (2,4,6,8)
</list>

or

picture.name.item(values.somevalue)

where values.somevalue has been set to a valid index number between 1 and 10.

<values>
/ somevalue  = 5
</values>

(or at runtime via /ontrialbegin = [values.somevalue = list.somelist.nextvalue])

The error you mentioned -- "A parameter of result was out of range" -- would indicate that the number you supplied is not in the valid range, e.g. if the <picture> has 10 items and you supply a value of, say, 13 you should see this kind of error.

This will hopefully allow you to determine where the mistake is.


Loukia
Loukia
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 22, Visits: 376
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now.



You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now. -- Just tried it now it doesn't work - error is "A parameter of result was out of range" which makes sense if only the index is supposed to go in that parenthesis. Anyway, thanks for the help, might need to live with the disappearing pictures in surveypages :) 

Loukia
Loukia
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 22, Visits: 376
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Sorry Dave I thought that the function works only for index--> picture.name.item(index) as per the manual. I will try that now.
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: 105K
Loukia - Wednesday, November 1, 2017
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia

If you want to retrieve a given value, you simply use the nextvalue property instead of the nextindex property.

Loukia
Loukia
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 22, Visits: 376
Dave - Wednesday, November 1, 2017
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Hi Dave, 
Apart from the item index is there any way we can have specific item values? I have nested lists unfortunately so that the index would call the index of a selected list and so on- see below (only one example).

<list food_ratings>
/ items = [list.go_savoury.nextvalue; list.go_sweet.nextvalue; list.nogo_savoury.nextvalue; list.nogo_sweet.nextvalue; list.filler_savoury.nextvalue; list.filler_sweet.nextvalue]
/ selectionrate = trial
/ select = values.ratings_set
</list>

<list go_savoury>
/ items = (list.foodA.nextvalue, list.foodB.nextvalue, list.foodC.nextvalue)
/ selectionrate = always
/ select = values.go_savoury
</list>

<list foodA>
/ items = (1,2,3)
/ selectionrate = always
/ resetinterval = 0
/ itemprobabilities = uniform
</list>

Thanks, 
Loukia
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: 105K
Loukia - Wednesday, November 1, 2017
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia

You should be able to do something like this:
<surveypage mypage>
/ questions = [1=img_a; 2=img_b; 3=img_c]
</surveypage>

<image img_a>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_b>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<image img_c>
/ items = ("<%picture.mypicture.item(list.mylist.nextindex)%>")
</image>

<picture mypicture>
/ items = myitems
</picture>

<item myitems>
/ 1 = "01.jpg"
/ 2 = "02.jpg"
/ 3 = "03.jpg"
/ 4 = "04.jpg"
/ 5 = "05.jpg"
/ 6 = "06.jpg"
</item>

<list mylist>
/ poolsize = 6
/ selectionrate = always
</list>


Loukia
Loukia
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 22, Visits: 376
Hi, 

I was working with lists of items for picture elements presented in surveypages in /stimulusframes. However, when a response is required and a participant doesn't respond the picture disappears. I know from the forums that the way to prevent this to use an <image> element instead. However, this element doesn't have the /select or /selectionmode attribute one can use to select specific items from an item list.

Is there any way you can choose the image item values/indices? I tried adding /items = item.stims.item(values.selected_index) but of course this has syntactic errors. 

Any help is much appreciated! 

Loukia
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search