Of course there is only one 'current' table in a JMP session. But you could do something like this:
NamesDefaultToHere(1);
// Make some tables with different numbers of columns
n = 5;
for(t=1, t<=n, t++, NewTable("Table "||Char(t), << addMultipleColumns("Test", Random Integer(5), Character)));
// Function that returns the names of all open tables containing a specified column
tablesWithColumn =
Function({inCol}, {Default Local},
matchingTables = {};
for(t=1, t<=NTable(), t++,
cols = DataTable(t) << getColumnNames("String");
if(Contains(cols, inCol), InsertInto(matchingTables, DataTable(t) << getName));
);
matchingTables;
);
// Try it out
myCol = "Test 3";
NewWindow("Open Tables with Column "||myCol,
PanelBox("Pick Tables to Join",
lb = ListBox(tablesWithColumn(myCol), maxSelected(2));
)
);