(PennController.)GetTable
description
Refers to a table, where tablename
can be the filename of a CSV file you uploaded to Resources (chunk_includes) or the name of a table that was created with AddTable
.
syntax
(PennController.)GetTable(tablename)
↳ What does (PennController.)
mean?
-
tablename
:
notes
- You would typically use
GetTable
withinTemplate
when your project contains more than one table and/or when you need to use only a subset of a table, usingGetTable().filter
.
example(s)
@
$Template( GetTable( "spreadsheet.csv" ) , row =>
@ newTrial( "button trial" ,
@ newButton("test button", row.ButtonText)
@ .print()
@ .wait()
@ )
@ .log( "Group" , row.Item )
@ .log( "Text" , row.ButtonText )
@);
- Generate two trials from the table spreadsheet.csv which contains two rows and the columns Item and ButtonText.