PennController for IBEX › Forums › Support › Two template types in one experiment? › Reply To: Two template types in one experiment?
October 8, 2019 at 2:24 pm
#4262
Jeremy
Keymaster
Hi David,
Yes it’s definitely possible. Simply use two different CSV tables, and pass their name as the first parameter to your Template function. Example:
PennController.AddTable( "table1" , `Column1,Column2 Table1RowACol1,Table1RowACol2 Table1RowBCol1,Table1RowBCol2`) PennController.AddTable( "table2" , `Column1,Column2 Table2RowACol1,Table2RowACol2 Table2RowBCol1,Table2RowBCol2`) PennController.Sequence( randomize("forced") , randomize("likert") ) PennController.Template( "table1" , row => PennController( "forced" , newScale( "answer" , row.Column1 , row.Column2 ) .settings.button() .settings.center() .print() .wait() ) ) PennController.Template( "table2" , row => PennController( "likert" , newScale( "score" , 5 ) .settings.center() .settings.before( newText(row.Column1) ) .settings.after( newText(row.Column2) ) .print() .wait() ) )
This example uses AddTable but of course you can directly upload CSV files to your project and use their filenames
Let me know if you have questions
Jeremy