interpolating text in captions


Author
Message
brendan
brendan
Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)Partner Member (810 reputation)
Group: Forum Members
Posts: 8, Visits: 25
Hi,

I am trying to create reusable code where I can use the same survey items multiple times with varying text. Basically, I want to ask people the same question several times, but change the subject of question each time. Below is a basic code example of what I am trying to do. The first part creates a set of associated pairs ("y1", "x1") etc. Then I want to interpolate those values as text into captions (and potentially other places). So in the example below I want occurrences of YYY to use item_y and XXX to use item_x.

I tried something similar to the percent interpolation in this link but it did not work:

http://www.millisecond.com/support/docs/v5/html/language/properties/caption.htm

Is there another way to do this or some way to tweak what I have?

Thanks!

<item items_y>
/ 1 = "y1"
/ 2 = "y2"
/ 3 = "y3"
</item>

<item items_x>
/ 1 = "x1"
/ 2 = "x2"
/ 3 = "x3"
</item>

<text text_y>
/ items = items_y
/ select = sequence
</text>

<text text_x>
/ items = items_x
/ select = text.text_y.currentindex
</text>

<expt some_expt>
/ blocks = [1=someblock;]
</expt>

<block someblock>
/ trials = [1-3=some_survey]
</block>

<surveypage some_survey>
/ questions = [1=some_caption; 2=some_textbox_x; 3=some_textbox_y;]
</surveypage>

<caption some_caption>
/ caption = "caption caption XXX caption caption YYY"
</caption>

<textbox some_textbox_x>
/ caption = "What is XXX?"
/ mask = decimal
/ required = false
</textbox>

<textbox some_textbox_y>
/ caption = "What is YYY?"
/ mask = decimal
/ required = false
</textbox>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
brendan - 8 Years Ago
Dave - 8 Years Ago
             Thanks! That's perfect.
brendan - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search