You can design custom tests and select or deselect multiple tests at once using the Customize Tests function. You specify the description, desired number, and label. This option is available only for Variables and Attribute chart types.
dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" );
dt << Control Chart Builder(
	Variables( Subgroup( :DAY ), Y( :DIAMETER ) ),
	Customize Tests( Test 1( 2, "1" ) ), // description, test number, label
	Chart( Position( 1 ), Warnings( Test 1( 1 ) ) ), // turn Test 1 on
	Chart( Position( 2 ) )
);
qc_col is the name of the column
qc_test is the test that failed
qc_sample is the sample number
qc_firstRow is the first row in the sample
qc_lastRow is the last row in the sample
dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );
obj = dt << Control Chart(
	Sample Size( :Sample ),
	KSigma( 3 ),
	Chart Col( :Weight, XBar, R ),
	Alarm Script(
		Write(
			"Out of Control for test ",
			qc_test,
			" in column ",
			qc_col,
			" in sample ",
			qc_sample
		)
	)
);
obj << Test 1( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );
dt << Control Chart(
	Alarm Script(
		Speak(
			Match( QC_Test,
				1, "One point beyond Zone A",
				QC_Test, 2,
				"Nine points in a row in zone C or beyond", QC_Test,
				5,
					"Two out of three points in a row in Zone A
					or beyond"
			)
		)
	),
	Sample Size( :Sample ),
	Ksigma( 3 ),
	Chart Col( :Weight, Xbar( Test 1( 1 ), Test 2( 1 ), Test 5( 1 ) ), R )
);
A phase is a group of consecutive observations in the data table. For example, phases might correspond to time periods during which a new process is brought into production and then put through successive changes. Phases generate, for each level of the specified Phase variable, a new sigma, set of limits, zones, and resulting tests.
dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" );
dt << Control Chart(
	Phase( :Phase ),
	Sample Size( :DAY ),
	KSigma( 3 ),
	Chart Col(
		:DIAMETER,
		XBar(
			Phase Level(
				"1",
				Sigma( .29 ),
				Avg( 4.3 ),
				LCL( 3.99 ),
				UCL( 4.72 )
			),
			Phase Level(
				"2",
				Sigma( .21 ),
				Avg( 4.29 ),
				LCL( 4 ),
				UCL( 4.5 )
			)
		),
		R( Phase Level( "1" ), Phase Level( "2" ) )
	)
);