Millisecond Forums

Strange data recording behavior for textbox/surveypage items

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

By yarrowdunham - 8/15/2017

Hi, 
We're experiencing a strange data recording issue with surveypages. A reproducible example is below. But basically we randomly choose one textbox question from within a surveypage. However, when we look at the data, answers from prior trials remain as data for the new trial, and there is a row for all three textboxes even though the participant only sees one and now data is recorded from the other. As far as we can tell, there is no way to look at the .iqdat and understand which is the actual trial the participant saw and therefore the actual response they provided.
Any advice/thoughts about what is going on and potential work-arounds?
Thanks




<surveypage genderQ>
/questions = [1=random(male,female,total)]
/showquestionnumbers = TRUE
/showpagenumbers = FALSE
</surveypage>

<textbox male>
/ caption="How many male faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox female>
/ caption="How many female faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox total>
/ caption="How many faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>


** Blocks from here ***

<block White_genderQ>
/ trials = [1-20=genderQ]
</block>


By Dave - 8/15/2017

yarrowdunham - Tuesday, August 15, 2017
Hi, 
We're experiencing a strange data recording issue with surveypages. A reproducible example is below. But basically we randomly choose one textbox question from within a surveypage. However, when we look at the data, answers from prior trials remain as data for the new trial, and there is a row for all three textboxes even though the participant only sees one and now data is recorded from the other. As far as we can tell, there is no way to look at the .iqdat and understand which is the actual trial the participant saw and therefore the actual response they provided.
Any advice/thoughts about what is going on and potential work-arounds?
Thanks




<surveypage genderQ>
/questions = [1=random(male,female,total)]
/showquestionnumbers = TRUE
/showpagenumbers = FALSE
</surveypage>

<textbox male>
/ caption="How many male faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox female>
/ caption="How many female faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox total>
/ caption="How many faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>


** Blocks from here ***

<block White_genderQ>
/ trials = [1-20=genderQ]
</block>



This actually by design and due to how surveypages need to work in the regular <survey> (as opposed to <block>) context. Basically, all three questions are _always_ part of the surveypage object, regardless of whether the given _instance_ of the surveypage displays question #1, #2 or #3.

For a use case such as yours, the solution would be to reframe the script a bit, for example like so:

<trial genderQ>
/ trialduration = 0
/ recorddata = false
/ branch = [list.pagelist.nextvalue]
</trial>

<list pagelist>
/ items = (surveypage.male, surveypage.female, surveypage.total)
</list>

<surveypage male>
/questions = [1=male]
/showquestionnumbers = TRUE
/showpagenumbers = FALSE
</surveypage>

<surveypage female>
/questions = [1=female]
/showquestionnumbers = TRUE
/showpagenumbers = FALSE
</surveypage>

<surveypage total>
/questions = [1=total]
/showquestionnumbers = TRUE
/showpagenumbers = FALSE
</surveypage>

<textbox male>
/ caption="How many male faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox female>
/ caption="How many female faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

<textbox total>
/ caption="How many faces did you see?"
/ mask=positiveinteger
/ range = (0, 100)
</textbox>

** Blocks from here ***

<block White_genderQ>
/ trials = [1-20=genderQ]
</block>

Hope this helps!
By yarrowdunham - 8/15/2017


Seems to be getting us on the right track, thanks Dave!