cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • 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.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

JMP Knowledge Base

Choose Language Hide Translation Bar
How to select rows based upon multiple conditions using a JMP® script

Overview

The following examples demonstrate how you can use the logical AND (&) and OR (|) operators with the Select Where message to select rows that meet multiple conditions.

Instructions

In a JMP® session, click the File menu and select New ► Script. Copy the below script and paste it into the script window. To run the sample script, click the Edit menu and select Run Script.

 

/* Open a sample data table */ 
dt = Open( "$SAMPLE_DATA\Big Class.jmp" ); 

/* Select rows where students are over 13, who are also less than 65 inches tall */ 
dt << Select Where( :age > 13 & :height < 65 );

Wait( 2 ); // For demonstration purposes 
dt << Clear Select; // For demonstration purposes 

/* Select rows where students are either 12 or 14 years old */ 
dt << Select Where( :age == 12 | :age == 14 ); 

 

Additional Documentation

More information about the JMP Scripting Language can be found in the Scripting Guide available in the online help.

 

[Previously JMP Note 49517]

Details
Operating System
macOS Windows
Products JMP JMP Pro

Recommended Articles