How to set my Text Box Visibility("Collapse") by JSLI 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<
);
Automation and ScriptingRe: How to set my Text Box Visibility("Collapse") by JSLPlenty 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
Re: How to set my Text Box Visibility("Collapse") by JSLa 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
Deleting "Where" text box with JSL
JMP User Community13.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 ...
Re: How to set my Text Box Visibility("Collapse") by JSLI 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.
Re: How to set my Text Box Visibility("Collapse") by JSLIt is TextBox not Textbox (capital
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(')]"));Re: How to set my Text Box Visibility("Collapse") by JSLSuch a simple oversight. Thanks for catching that! It is working for me now and I couldn't be happier, those text boxes are expecially annoying when exporting charts to a PPT. JMP really needs a setting to hide them so this kind of workaround wouldn't be necessary.