cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
shampton82
Level VII

Why is this code selecting the top level outline box and not the requested one?

I was playing along with a Discovery Summit video on interacting with Report layer objects and came to a crashing halt on my very first example I tired.

 

Here I am trying to select the Correlation outline box but this ends up selecting the entire Multivariate analysis.  I've tried a couple of different approaches and can't get it work out so humbling asking for some input!

 

 

dt=Open( "$SAMPLE_DATA/Big Class.jmp" );


dt<<Multivariate(
	Y( :height, :weight ),
	Variance Estimation( "Row-wise" ),
	Scatterplot Matrix( 1 )
);

obj=Current Report()["Multivariate"]<< get scriptable object;

obj<< XPath("//OutlineBox[text()='Correlations']")<<select;

Want this:

 

shampton82_1-1730578283914.png

 

Getting this:

shampton82_0-1730578267391.png

 

Thanks!

Steve

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII

Re: Why is this code selecting the top level outline box and not the requested one?

You got it right, but your attempt to double-check was misleading : )

 

To select the outline boxes which are returned by the Xpath command, use:

(obj<< XPath("//OutlineBox[text()='Correlations']"))<<select;

 

Without the  additional brackets, you will send the select command to obj.
like in 

Data Table( "Height" ) << Clear Select << Select Rows( [4] ) << Delete Rows;

 

View solution in original post

3 REPLIES 3
hogi
Level XII

Re: Why is this code selecting the top level outline box and not the requested one?

You got it right, but your attempt to double-check was misleading : )

 

To select the outline boxes which are returned by the Xpath command, use:

(obj<< XPath("//OutlineBox[text()='Correlations']"))<<select;

 

Without the  additional brackets, you will send the select command to obj.
like in 

Data Table( "Height" ) << Clear Select << Select Rows( [4] ) << Delete Rows;

 

shampton82
Level VII

Re: Why is this code selecting the top level outline box and not the requested one?

Oh I was so close!!  Thanks for the assist @hogi , that was going to drive me crazy.....

 

Back to the video now

I Can See It. How Do I Get It? - JMP User Community

 

 

 

Steve

hogi
Level XII

Re: Why is this code selecting the top level outline box and not the requested one?

Great Video, thanks for the link!