cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
cubji1
Level I

How to set my Text Box Visibility("Collapse") by JSL

I had a JSL for creating a window to show many Graph Builders, due to I used where language to filter data, the new window will auto creat a Text Box(" Where  :CID == a[1][g] & :VARABLE == a[2][g]  & :WNDOW==a[3][g]  & :SATISTIC==a[4][g] & :CLLECTION_NAME==a[5][g]"), I want to set this Text Box property "Collapse", Can you give me a solution, thanks a lot.
Data Table( "FSS" ):RUN_START_DATE << Data Type(Numeric,Format( "yyyymmdd", 8 ),Input Format( "yyyymmdd" )) << Set Modeling Type( "Continuous" );
summarize(a=by(:CED,:VARABLE,:WNDOW,:SATISTIC,:CLLECTION_NAME),b=min(:LOWER_CRITICAL),c=max(:UPPER_CRITICAL));
n=nitems(b);
 
FDCD=new window("FDC", vlb=v list Box());
For( i = 1, i <= n, i=i+j-1,
hlb= h List Box(
for(j=1, j<=4,j++,
g=i+j-1;
graph = Graph Builder(
Size( 400, 300 ),
Show Control Panel( 0 ),
Show Title( 0 ),
Where( :CID == a[1][g] & :VARABLE == a[2][g]  & :WNDOW==a[3][g]  & :SATISTIC==a[4][g] & :CLLECTION_NAME==a[5][g]),
Show Where( 0 ),
Variables(
X( :RUN_START_DATE ),
Y( :VALUE ),
Group X( :ENTITY ),
Overlay( :RECIPE ),
),
Elements( Points( X, Y, Legend( 10 ) ), Smoother( X, Y, Legend( 11 ) ) ),
SendToReport(
Dispatch({},"Graph Builder",OutlineBox,{Set Title( a[1][g]||"|"||a[2][g]||"|"||a[3][g]||"|"||a[4][g] ), Image Export Display( Normal )}),
Dispatch({},"RUN_START_DATE",ScaleBox,{ Interval( "Day" ),Inc( 3 ), Minor Ticks( 1 )}),
Dispatch({},"VALUE",ScaleBox,{//Max(c[i]+(c[i]-b[i])*0.1,:VALUE*1.1), Min( b[i]+(c[i]-b[i])*0.1,:VALUE*0.9 ),
Add Ref Line( c[g], "Dashed", "Red", "UCL", 1 ),
Add Ref Line( b[g], "Dashed", "Red", "LCL", 1 )})
)
);
);
);
vlb<<append(hlb);
);

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: How to set my Text Box Visibility("Collapse") by JSL

Plenty of old posts which have solutions for this. My preferred method is to use XPath

Names Default To Here(1); 

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

nw = New Window("",
	V List Box(
		gb = dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
			Where(:sex == "M")
		),
		gb = dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
			Where(:sex == "F")
		)
	)
);

wait(1);

where_teb = nw << XPath("//TextBox[contains(text(), 'Where(')]");
where_teb << Visibility("Collapse");

you can make the XPath more robust if you know which column is used for filtering or which values are being filtered

-Jarmo

View solution in original post

hogi
Level XIII

Re: How to set my Text Box Visibility("Collapse") by JSL

a very good post to start with:
Getting correct answers to correct questions quickly 

https://www.google.com/search?q=how+to+remove+where++site%3Acommunity.jmp.com 


Remove "where(...)" text in report
hogi_0-1726931167927.png JMP User Community
17.03.2021 — Here is an example of a report that has a where clause and the code that deletes it.

how to remove "Where" from graph builder report window
hogi_1-1726931167928.png JMP User Community
29.07.2018 — All you need to do, is to find the top of the display tree, and then delete the first text box, which is the display of the Where clause.

How to remove "where" condition from Contol Chart displays.
hogi_2-1726931167928.png JMP User Community
Solved: Hello, I'm plotting three different charts(IR,EWMA & CUSUM) in a single window but the problem I'm facing is it's displaying the where.

Deleting "Where" text box with JSL
hogi_3-1726931167928.png JMP User Community
13.02.2020 — While running script with "where" function, a text box is added to report. What is the way to delete it? Is there some way to "not create" it instead of delete ...

how to remove "Where" from graph builder report window
hogi_4-1726931167929.pngJMP User Community
29.07.2018 — the output creates a text above the outline box "Where parameter=param", i would like to remove that. how can i do that?

 

View solution in original post

4 REPLIES 4
jthi
Super User

Re: How to set my Text Box Visibility("Collapse") by JSL

Plenty of old posts which have solutions for this. My preferred method is to use XPath

Names Default To Here(1); 

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

nw = New Window("",
	V List Box(
		gb = dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
			Where(:sex == "M")
		),
		gb = dt << Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
			Where(:sex == "F")
		)
	)
);

wait(1);

where_teb = nw << XPath("//TextBox[contains(text(), 'Where(')]");
where_teb << Visibility("Collapse");

you can make the XPath more robust if you know which column is used for filtering or which values are being filtered

-Jarmo
jevanove
Level II

Re: How to set my Text Box Visibility("Collapse") by JSL

I realize that this is an old post, but I am trying to use this method to remove the "Where" statements from the control charts I am generating, but my XPath expression seems to always come back with an empty list, even if I cut back to only search for TextBox objects with no filtering criteria. To give an overview of my script, I have a stacked data table. I start by making a window and inserting a VListBox. 

CtrlChart = New Window("Trend Charts",
	vlbreport = V List Box("Trend Review");
);

Then, I use a loop to append control charts to vlbreport as individual V List Boxes.

vlbreport << Append(
			V List Box(
				Control Chart Builder( **Control chart setting here) ); );

Then after a wait command to ensure the window is fully populated, I am trying to use XPath to simply feed back all Text Boxes, but I keep coming up empty.

allbox = CtrlChart << XPath("//Textbox");

Currently, allbox is being returned as {}. If I use Show Tree Structure on CtrlChart, I can see the full structure, including all the TextBox objects within, but it just isn't selecting anything. Do you have any insights into why this is happening? I like the idea of using XPath to isolate the Where boxes because it is a truly dynamic solution that can be applied to all of my scripts that are formatted this way. However, I have little to no familiarity with XPath. My scripting knowledge in general has come from a lot of trial and error, googling, and the scripting guide.

jthi
Super User

Re: How to set my Text Box Visibility("Collapse") by JSL

It is TextBox not Textbox (capital B) in the XPath

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

cols = {"NPN1", "PNP1", "PNP2"};


nw = New Window("Trend Charts",
	vlb = V List Box()
);


For Each({colname}, cols,
	vlb << Append(
		ccb = dt << Control Chart Builder(
			Show Limit Summaries(0),
			Show Capability(0),
			Variables(Y(Eval(colname))),
			Show Control Panel(0),
			Where(:Site == 1)
		)
	);
);



Show(nw << XPath("//Textbox[contains(text(), 'Where(')]"));
Show(nw << XPath("//TextBox[contains(text(), 'Where(')]"));
-Jarmo
hogi
Level XIII

Re: How to set my Text Box Visibility("Collapse") by JSL

a very good post to start with:
Getting correct answers to correct questions quickly 

https://www.google.com/search?q=how+to+remove+where++site%3Acommunity.jmp.com 


Remove "where(...)" text in report
hogi_0-1726931167927.png JMP User Community
17.03.2021 — Here is an example of a report that has a where clause and the code that deletes it.

how to remove "Where" from graph builder report window
hogi_1-1726931167928.png JMP User Community
29.07.2018 — All you need to do, is to find the top of the display tree, and then delete the first text box, which is the display of the Where clause.

How to remove "where" condition from Contol Chart displays.
hogi_2-1726931167928.png JMP User Community
Solved: Hello, I'm plotting three different charts(IR,EWMA & CUSUM) in a single window but the problem I'm facing is it's displaying the where.

Deleting "Where" text box with JSL
hogi_3-1726931167928.png JMP User Community
13.02.2020 — While running script with "where" function, a text box is added to report. What is the way to delete it? Is there some way to "not create" it instead of delete ...

how to remove "Where" from graph builder report window
hogi_4-1726931167929.pngJMP User Community
29.07.2018 — the output creates a text above the outline box "Where parameter=param", i would like to remove that. how can i do that?

 

Recommended Articles