cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
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 XII

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

2 REPLIES 2
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
hogi
Level XII

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?