PennController for IBEX › Forums › Support › using rshuffle when pulling items from csv file › Reply To: using rshuffle when pulling items from csv file
October 8, 2019 at 11:43 pm
#4265
Jeremy
Keymaster
Hi Cassandra,
The labeling and sequence order system did not change in PennController, the only difference is that you no longer have to write var shuffleSequence = seq( ... ), you can use PennController.Sequence( ... ) instead. Items are labeled using the first argument of the PennController function that creates them (if provided as a string). Here’s an example (I use AddTable for the sake of illustration—using a CSV file works just as well):
PennController.AddTable( "myTable" , `Column1,Column2 UpperCase,Hello LowerCase,hello UpperCase,World LowerCase,world` ) PennController.Sequence( rshuffle("UpperCase","LowerCase") ) PennController.Template( "myTable" , row => PennController( row.Column1 , // Using Column1 to label the trials newButton( row.Column2 ) .print() .wait() ) )
Let me know if the example is unclear
Jeremy