cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lala
Level VII

How does JSL extract a subset of selected rows for a column in a data table?

It seemed like a simple question, but I didn't succeed.
This selected line number is already selected by other scripts.

Thanks!

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

r = dt << Get Selected Rows();
d3 = dt << Subset( Output Table( "tt" ), Selected Rows( r ), selected columns( 0 ) );

2024-04-23_09-19-07.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: How does JSL extract a subset of selected rows for a column in a data table?

selected rows() expects a boolean value, either 0 or 1.  In your example you would specify

selected rows( 1 )

which indicates to the platform to use selected rows for the subset.

Jim

View solution in original post

lala
Level VII

Re: How does JSL extract a subset of selected rows for a column in a data table?

Thank Jim!

d3 = dt << Subset(
	Output Table( "tt" ),
	Selected Rows( 0 ),
	Rows( dt << Get Selected Rows() ),
	Selected columns only( 0 )
);
  • I press manual operation to modify.

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How does JSL extract a subset of selected rows for a column in a data table?

selected rows() expects a boolean value, either 0 or 1.  In your example you would specify

selected rows( 1 )

which indicates to the platform to use selected rows for the subset.

Jim
lala
Level VII

Re: How does JSL extract a subset of selected rows for a column in a data table?

Thank Jim!

d3 = dt << Subset(
	Output Table( "tt" ),
	Selected Rows( 0 ),
	Rows( dt << Get Selected Rows() ),
	Selected columns only( 0 )
);
  • I press manual operation to modify.

txnelson
Super User

Re: How does JSL extract a subset of selected rows for a column in a data table?

This works too

Jim