Here is a script that will accomplish what you need. It uses a pointer to the data table in the first example, and uses an actual table name in the second example
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
TestFunction = Function( {TableName, ColumnName, Value}, {},
TableName << Select where(as column(ColumnName) == Value);
);
testfunction(dt,"age",13);
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
TestFunction = Function( {TableName, ColumnName, Value}, {},
data table(TableName) << Select where(as column(ColumnName) == Value);
);
testfunction("Big Class","age",13);
Jim