cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jmp13
Level I

JSL: How to get retrieve names of more than one currently selected tables?

Hi folks. I'm dealing with new tables every day (unique table names) which always have at least one common column header, which I use to Match Columns for Join. This is getting repetitive so I've been thinking of writing a script.

 

Problem: I don't want to have to specify both the table names in the script every time I want to Join two tables.

 

I'm looking for a method for the script to auto/semi-automatically pick the two tables I want to join. I know there is a method to retrieve the Currently Selected table, but what about the table Selected Before That? Best case is if there is a method to retrieve table names for all tables currently selected and then proceed to do Join for these tables.

 

Appreciate all ideas and advice! Thanks!

 

 

1 REPLY 1
ian_jmp
Level X

Re: JSL: How to get retrieve names of more than one currently selected tables?

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));		
		)
	);

Recommended Articles