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

Sequentially exclude rows?

Hi.  Is there a command to exclude rows that doesn't also unexclude previously excluded rows?  In my script, I'd like to exclude rows in a table that already may have some of these rows excluded.  The problem is that if I use Exclude, it may actually Unexclude previously excluded rows.  For example:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Clear Row States;
r = dt << Select Rows([5, 7, 8, 10]);
r << Exclude;
dt << Clear Select;
r = dt << Select Rows([7, 8, 10]);   //Selection may be a subset of the above selection
r << Exclude;  //This ends up unexcluding these rows

This behavior seems to happen only if the subsequent row selection is equal to or a subset of the initial set of excluded rows.  If I were to add row 11 to the second selection above however (making it different from the first selection), the second Exclude command would simply add row 11 to the set of excluded rows.  This is the behavior I want.

 

I cannot know if the second selection will be a subset of the first selection ahead of time, so it would be nice if there were a command that simply excludes the rows regardless of what is already excluded.

 

Second question: is there a way to exclude rows that does not require selecting them first?  For example, if I just have a vector containing the rows I wish to exclude, is there a way I could just use that?

 

Thanks for the help.

2 REPLIES 2
Thierry_S
Super User

Re: Sequentially exclude rows?

Hi,
Have you considered using the variation of the Exclude command: "Exclude (1)"? The basic "Exclude" command is a toggle as you experienced in your script.
Best,
TS
Thierry R. Sornasse
Georg
Level VII

Re: Sequentially exclude rows?

In addition to @Thierry_S , here is the online documentation, it is well described there.

You can

  • request row states,
  • send commands to toggle them,
  • and specifically turn them on or off.

Row States (jmp.com)

Georg