cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Bhasemeier
Level I

JSL for Control chart Text Box

Hello,

 

I utilize a script which creates a control chart with a nested where statement. The script runs properly, however, the final output of the script  generates a small text box above my control chart frame box with my where statement clause. When this script is saved into my final report through powerpoint or text, a new page is created of this where statement text box for each chart.

 

Is it possible to add JSL language to delete or edit this text box or to not print the text box?

 

Bhasemeier_0-1627431687100.png

 

3 REPLIES 3
txnelson
Super User

Re: JSL for Control chart Text Box

Here is a script that will illustrate how to delete the displayed Where Clause

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );

Control Chart Builder(
	Test Excluded Subgroups( 1 ),
	Variables( Y( :height ) ),
	Where( :sex == "F" )
);

current report()[textbox(1)]<<delete;

See the section in the Scripting Guide on Display Trees for documentation on the manipulation of output like this.

Jim
Bhasemeier
Level I

Re: JSL for Control chart Text Box

Thank you for the quick response.

 

Is there a way to clearly identify which text box this is used in? I have to also apply this to some for loops where it seems there is a dynamic text box call out and I cannot find the properties for which text box number I need to delete.

 

Here is an example of the for looping function I am trying.

 

 

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )

Open( "$SAMPLE_DATA/big class.jmp" );
ncol = N Col( Data Table( "big class" ) );

combo = V List Box();
w = New Window( "Run Charts", 
    H List Box( combo )
);

For( i = 4, i <= ncol, i++,
    plot = V List Box(
        Control Chart Builder(
            Test Excluded Subgroups( 1 ),
            Variables( Y( Column( i ) ) ),
            Where( :sex == "F" )
        );
    );
    combo << append( plot );
    Current Report( combo )[Text Box( i - 3 )] << delete;
);

 

txnelson
Super User

Re: JSL for Control chart Text Box

Given the structure of how you are approaching your analysis, I would handle the deletion of the text box, by deleting it before appending the output to your V List Box.

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )

Open( "$SAMPLE_DATA/big class.jmp" );
ncol = N Col( Data Table( "big class" ) );

combo = V List Box();
w = New Window( "Run Charts", 
    H List Box( combo )
);

For( i = 4, i <= ncol, i++,
    plot = V List Box(
        cc = Control Chart Builder(
            Test Excluded Subgroups( 1 ),
            Variables( Y( Column( i ) ) ),
            Where( :sex == "F" )
        );
    );
    (report(cc)<<parent)[textbox(1)]<<delete;
    combo << append( plot );
);

The report element for a platform points to the first Outline Box() in the report, not to the HeadBox() as the Current Report() function does.  Therefore, one needs to move to the parent above the first OutlineBox() and the find the first text box() from that point.

Jim