cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Raybob
Level II

Remove the "Where" from Window and Change grouping column names

I am looking to remove the "Where..." from my window, but it does not work as I thought it should. I tried the same method that does work for graphs (as noted by @txnelson).I am guessing it's just a simple naming convention issue?

 

I am also trying to rename my table's grouping column :Identity to "Phase".

 

nw =New Window("window title",
		V List Box(
			tb = concat<<Tabulate(
			Change Item Label(Grouping Columns( :Identity, "Phase" ) ),
				Show Control Panel( 0 ),
				//Set Format( Uniform Format( 10, 2 ) ),//All metrics have same format
				Set Format( Mean( :"Mw/Mn"n( 10, 2 ) ) ),
				Where(:Product==GroupBy[i]),
				Add Table(
		Column Table( Analysis Columns( :Mw, :"Mw/Mn"n ), Statistics( Mean ) ),
		Row Table( Grouping Columns( :Lot, :Identity ) )//End Row table
				),//end Add Table
				Change Item Label( Statistics( Mean, "Avg" ) ),
				SendToReport(Dispatch({}, "Tabulate", OutlineBox, {Set Title( tabulatetitle )} ) )
			)//end tabulate (tb)
		)//end v list box
	);//end nw new window
		tp = Window(nw) << topparent; //finds the top of the display tree
	tp[Text Box(1)] << delete; // deletes text box 
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Remove the "Where" from Window and Change grouping column names

I'm not exactly sure which of the many methods is referenced here, but XPath usually works. Here is one example which might work:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

tab = new window("",
		Tabulate(
		Show Control Panel(0),
		Add Table(
			Column Table(Grouping Columns(:age)),
			Row Table(Grouping Columns(:name))
		),
		Where(:sex == "F")
	);
);

wait(2);
where_tb = (tab << Top Parent) << XPath("//TextBox[contains(text(), 'Where(:')]");
where_tb[1] << Visibility("Collapse"); //or delete
-Jarmo

View solution in original post

txnelson
Super User

Re: Remove the "Where" from Window and Change grouping column names

The Scripting Index is as close to the Definitive reference for what messages and options are available to a given platform.  Looking in the index, one finds that there is not a reference to a "Where" clause being available.  So your attempt at including it in your Tablulate platform JSL will not work.  A potential solution would be to use a Local Data Filter to do the Where processing, and then set it's visibility to "Collapse" or "Hidden" so it does not interfere with the display.

 

Concerning your attempt to change the display name of "Identity" to "Phase", once again the Scripting Index provides the reason your JSL does not work.

txnelson_0-1645119897440.png

The Change Item Label only has the current capability of changing the Statistics label.  A workaround for this is pretty simple.  One can add a new Virtual Transformation column to the Tabulate Dialog Box.  Declare it a Formula and then set the formula for the new column to be

:Identity

Then rename the new Transform column "Phase" and use it in the definition of your Tablulate table, as I have done in the simple example below

txnelson_1-1645120304496.png

In this case, I used the column Age as you would use Identity

Here is the JSL that my simple example creates

Tabulate(
	Change Item Label( Statistics( Mean, "zippy" ) ),
	Remove Column Label( Analysis Columns( height ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :height ), Statistics( Mean ) ),
		Row Table(
			Grouping Columns(
				Transform Column( "Phase", Ordinal, Formula( :age ) )
			)
		)
	)
);

  

Jim

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Remove the "Where" from Window and Change grouping column names

I'm not exactly sure which of the many methods is referenced here, but XPath usually works. Here is one example which might work:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

tab = new window("",
		Tabulate(
		Show Control Panel(0),
		Add Table(
			Column Table(Grouping Columns(:age)),
			Row Table(Grouping Columns(:name))
		),
		Where(:sex == "F")
	);
);

wait(2);
where_tb = (tab << Top Parent) << XPath("//TextBox[contains(text(), 'Where(:')]");
where_tb[1] << Visibility("Collapse"); //or delete
-Jarmo
txnelson
Super User

Re: Remove the "Where" from Window and Change grouping column names

The Scripting Index is as close to the Definitive reference for what messages and options are available to a given platform.  Looking in the index, one finds that there is not a reference to a "Where" clause being available.  So your attempt at including it in your Tablulate platform JSL will not work.  A potential solution would be to use a Local Data Filter to do the Where processing, and then set it's visibility to "Collapse" or "Hidden" so it does not interfere with the display.

 

Concerning your attempt to change the display name of "Identity" to "Phase", once again the Scripting Index provides the reason your JSL does not work.

txnelson_0-1645119897440.png

The Change Item Label only has the current capability of changing the Statistics label.  A workaround for this is pretty simple.  One can add a new Virtual Transformation column to the Tabulate Dialog Box.  Declare it a Formula and then set the formula for the new column to be

:Identity

Then rename the new Transform column "Phase" and use it in the definition of your Tablulate table, as I have done in the simple example below

txnelson_1-1645120304496.png

In this case, I used the column Age as you would use Identity

Here is the JSL that my simple example creates

Tabulate(
	Change Item Label( Statistics( Mean, "zippy" ) ),
	Remove Column Label( Analysis Columns( height ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :height ), Statistics( Mean ) ),
		Row Table(
			Grouping Columns(
				Transform Column( "Phase", Ordinal, Formula( :age ) )
			)
		)
	)
);

  

Jim