cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Exclude rows from linked Summary table

Hello,

 

I have a linked summary table that I am trying to exclude rows based on some criteria of the cell contents for specific columns.  The objective is for the rows in the linked table to also become excluded.  I know it is possible to do this outside of JMP scripting but for some reason I get an error in JSL.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtSummary = dt << Summary( Group(:age), Link to original data table(1));
r = dtSummary << Get Rows Where(:age == 14);
r << Exclude;

 

My actual code has more complicated row selection criteria but the above example has the same idea.

 

The error returned is:

 

ERROR: Send Expects Scriptable Object in access or evaluation of 'Send' , r << Exclude;

 

I appreciate any help in advance.

 

Thx,

 

Ry

1 ACCEPTED SOLUTION

Accepted Solutions
cwillden
Super User (Alumni)

Re: Exclude rows from linked Summary table

Change "Get Rows Where" to "Select Where"

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtSummary = dt << Summary( Group(:age), Link to original data table(1));
r = dtSummary << Select Where(:age == 14);
r << Exclude;

This worked on my end.  Better yet, you can do it this way:

dtSummary << Select Where(:age == 14) << Exclude;

Get Rows Where() returns a list or the row numbers that meet the criteria.  Sending an Exclude message to a list of numbers doesn't do anything, so that's why it wasn't working.

-- Cameron Willden

View solution in original post

2 REPLIES 2
cwillden
Super User (Alumni)

Re: Exclude rows from linked Summary table

Change "Get Rows Where" to "Select Where"

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtSummary = dt << Summary( Group(:age), Link to original data table(1));
r = dtSummary << Select Where(:age == 14);
r << Exclude;

This worked on my end.  Better yet, you can do it this way:

dtSummary << Select Where(:age == 14) << Exclude;

Get Rows Where() returns a list or the row numbers that meet the criteria.  Sending an Exclude message to a list of numbers doesn't do anything, so that's why it wasn't working.

-- Cameron Willden
RyMcQeN
Level III

Re: Exclude rows from linked Summary table

Thank you for the quick response. I had tried Select Where earlier but had the wrong syntax. Appreciate the help!

-Ry

Recommended Articles