cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
tbidwell
Level III

How do I retrieve a row of data from a table in a display window that has been selected?

I have a window that has a table in it (i.e., the first 5 rows of Big Class.jmp) that I created using the script below and I'd like to know:

1) that a row of the table was selected

2) retrieve the row of data from the table in the window

 

After the window has been made, let's assume the user selects a row of the table as shown in the attached image. 

Note: I am using JMP ver 17.1.

 

names default to here(1);

dt = open("$sample_data\big class.jmp", invisible);
rpt = dt << select where(row()<5) << get as report;
nw = new window("test",
	v list box(
		outline box("Big Class", rpt)
	)
);

big class example.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I retrieve a row of data from a table in a display window that has been selected?

Report from data table is Border box with Table box inside it so you can use that

jthi_0-1698432515546.png

 

Names Default To Here(1);

dt = Open("$sample_data\big class.jmp", invisible);
rpt = dt << select where(Row() < 5) << get as report;
nw = New Window("test", 
	V List Box(
		Outline Box("Big Class", 
			rpt
		)
	)
);

rpt[Table Box(1)] << Get Selected Rows;

after you know the object type you can fairly easily see from scripting index what you can do

jthi_1-1698432573633.png

or you could use Show Properties

Show Properties(rpt[Table Box(1)])
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How do I retrieve a row of data from a table in a display window that has been selected?

Report from data table is Border box with Table box inside it so you can use that

jthi_0-1698432515546.png

 

Names Default To Here(1);

dt = Open("$sample_data\big class.jmp", invisible);
rpt = dt << select where(Row() < 5) << get as report;
nw = New Window("test", 
	V List Box(
		Outline Box("Big Class", 
			rpt
		)
	)
);

rpt[Table Box(1)] << Get Selected Rows;

after you know the object type you can fairly easily see from scripting index what you can do

jthi_1-1698432573633.png

or you could use Show Properties

Show Properties(rpt[Table Box(1)])
-Jarmo