cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

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

Deleting rows using JSL scripts

How can we delete rows from a data table (using JMP script) when some columns in this data table satisfy a particular criteria?

Using Delete Rows is not working for me in my script.

Thanks
2 ACCEPTED SOLUTIONS

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Deleting rows using JSL scripts

Here is one way to do it.

dt = Current Data Table();
For Each Row( Row State() = Selected State( criteriacolumn[] == criteria ) );
dt << delete rows();

View solution in original post

pmroz
Super User

Re: Deleting rows using JSL scripts

Here's another way. I don't know if it's any faster.

dt << select where(:N < min_case_value);
dt << delete rows;

View solution in original post

5 REPLIES 5
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Deleting rows using JSL scripts

Here is one way to do it.

dt = Current Data Table();
For Each Row( Row State() = Selected State( criteriacolumn[] == criteria ) );
dt << delete rows();
asvp
Level I

Re: Deleting rows using JSL scripts

Thanks MS, it works.
pmroz
Super User

Re: Deleting rows using JSL scripts

Here's another way. I don't know if it's any faster.

dt << select where(:N < min_case_value);
dt << delete rows;
mpb
mpb
Level VII

Re: Deleting rows using JSL scripts

> Here's another way. I don't know if it's any
> faster.

Well I made a table with 6 columns and 100,000 rows and the For solution took about 1 second and the direct select took "0" seconds.

When I increased the number of rows to 1,000,000 then the For solution took 11 or 12 seconds and the direct select took 3 seconds.

So on my pc running winXP using this particular table the direct select is about 4 times faster but you would need a really large table to notice the difference.

Michael
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Deleting rows using JSL scripts

Thanks!

Fast is good. The direct method has also the advantage that easier to read (and remember).

The loop method still is useful when you need to set other or combined row states.

Recommended Articles