cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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