This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Scripting Guide > Display Trees > Construct Custom Windows > Counting the Number of Child Boxes
Publication date: 07/30/2020

Counting the Number of Child Boxes

Suppose that you want to count the number of child text boxes in a list box. The most reliable way is to use XPath to find a specific string in the text boxes and then use N Items() to count the number of text boxes.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
	Y( :weight ),
	X( :height ),
	Group By( :age ),
	Fit Line( {Line Width( 3 )} )
);
 

/* start with the root list box, find a text edit box

that starts with “Linear Fit age==”, and count the number of children */

N Items( biv << XPath( "//ListBox[starts-with(TextEditBox,'Linear Fit age==')]" ) );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).