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

Error: current column could not be found in the platform

I am getting a strange error message when combining a column switcher, a data filter and a row state handler function. 

 

The script attached gives a simplified example (apologies that it's still quite long). In summary, the script:

  1. Uses a data table that includes columns with spec limits (I’m using ‘Semiconductor Capability’ as an example)
  2. Creates a Process Capability Summary Report table
  3. Appends to the table a Distribution output and a column switcher
  4. Tidies up the table and links the column switcher to the Distribution
  5. Creates a row change function to monitor updates to the Process Capability table
  6. When the user selects a row in the table, the parameter column name is captured and passed to the column switcher, which changes the Distribution platforms.

This works fine, until the source data table is filtered with unwanted rows hidden and excluded. The process capability table updates OK, but if I then select a new parameter from the table, I get this message appear twice (or more times):

matth1_0-1699883610813.png

The distribution platform does eventually update. However, if the user does further filtering, eventually I get the following error:

matth1_1-1699883769522.png

When I get this, the row state handler appears completely disassociated with the table.

 

I'd be grateful if anyone can suggest a fix, or a better way of doing what I'm doing!

 

I am using JMP 17.2 on MacOS.

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XI

Re: Error: current column could not be found in the platform

I made some minor changes *) - have to check what actually fixed the issue - did it?

- use the column switcher of the Distribution report and get a handle via report layer

- define setUpTableSelect as a function with 1 argument, such that it can be directly used as function call from make row state handler 

 

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
dt << clear column selection() << clear select();
dt << Data Filter(
	Mode( Select( 0 ), Include( 1 ) ),
	Add Filter( columns( :lot_id ), Display( :lot_id, N Items( 13 ) ) )
);

colList = {:NPN1, :PNP1, :PNP2, :NPN2, :PNP3};

Eval(
	Eval Expr(
		win1 = New Window( "Parametric Test Summary Report",
			pc = dt << Process Capability(
				Process Variables( Expr( colList ) ),
				Moving Range Method( Average of Moving Ranges ),
				Capability Box Plots( 0 ),
				Within Sigma Summary Report( 1 ),
				Goal Plot( 0 ),
				Capability Index Plot( 0 ),
				Process Performance Plot( 0 ),
				Automatic Recalc( 1 ),
				SendToReport(
					Dispatch(
						{"Within Sigma Capability Summary Report"},
						"",
						TableBox,
						{Sort By Column( 14, 1 )}
					)
				)
			),
			tb = Text Box(
				" Parameter distribution will appear below here. Select a row to show distribution for that parameter. \!N",
				<<set wrap( 1000 )
			),
			H List Box(

				Distribution(
					Stack( 1 ),
					Continuous Distribution(
						Column( Expr( colList[1] ) ),
						Horizontal Layout( 1 ),
						Always use column properties( 1 ),
						Vertical( 0 ),
						Count Axis( 1 ),
						Outlier Box Plot( 0 ),
						Normal Quantile Plot( 1 ),
						Process Capability( Use Column Property Specs )
					),
					Column Switcher(
						Expr( colList[1] ),
						Expr( colList ),
						Title( "choose column" )
					),
					Automatic Recalc( 1 )
				)
			)
		)
	)
);

cs = (Current Report()["choose column"]<< get scriptable object);

setUpTableSelect = Function({x},
	Print( 1 );
	pct = Report( pc )[Table Box( 1 )];
	pct << set click sort( 1 );
	Try( pct[Number Col Box( "Cpm" )] << delete( 1 ) );
		
	Wait( 0 );
	pct << set height( 250 );
	win1 << move window( 0, 0 );

	pct << set row change function(
		Function( {this},
			selRow = this << get selected rows();
			If( N Items( selRow ) > 1,
				Throw( "Only select a single row" ),
				Show( col1 = dt << get selected columns() );
				cs << set current( Char( col1[1] ) );
			);
			dt << clear column selection();
		)
	);
);

setUpTableSelect(1);


rs = dt << make row state handler( setUpTableSelect ); 

 

View solution in original post

4 REPLIES 4
hogi
Level XI

Re: Error: current column could not be found in the platform

I made some minor changes *) - have to check what actually fixed the issue - did it?

- use the column switcher of the Distribution report and get a handle via report layer

- define setUpTableSelect as a function with 1 argument, such that it can be directly used as function call from make row state handler 

 

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
dt << clear column selection() << clear select();
dt << Data Filter(
	Mode( Select( 0 ), Include( 1 ) ),
	Add Filter( columns( :lot_id ), Display( :lot_id, N Items( 13 ) ) )
);

colList = {:NPN1, :PNP1, :PNP2, :NPN2, :PNP3};

Eval(
	Eval Expr(
		win1 = New Window( "Parametric Test Summary Report",
			pc = dt << Process Capability(
				Process Variables( Expr( colList ) ),
				Moving Range Method( Average of Moving Ranges ),
				Capability Box Plots( 0 ),
				Within Sigma Summary Report( 1 ),
				Goal Plot( 0 ),
				Capability Index Plot( 0 ),
				Process Performance Plot( 0 ),
				Automatic Recalc( 1 ),
				SendToReport(
					Dispatch(
						{"Within Sigma Capability Summary Report"},
						"",
						TableBox,
						{Sort By Column( 14, 1 )}
					)
				)
			),
			tb = Text Box(
				" Parameter distribution will appear below here. Select a row to show distribution for that parameter. \!N",
				<<set wrap( 1000 )
			),
			H List Box(

				Distribution(
					Stack( 1 ),
					Continuous Distribution(
						Column( Expr( colList[1] ) ),
						Horizontal Layout( 1 ),
						Always use column properties( 1 ),
						Vertical( 0 ),
						Count Axis( 1 ),
						Outlier Box Plot( 0 ),
						Normal Quantile Plot( 1 ),
						Process Capability( Use Column Property Specs )
					),
					Column Switcher(
						Expr( colList[1] ),
						Expr( colList ),
						Title( "choose column" )
					),
					Automatic Recalc( 1 )
				)
			)
		)
	)
);

cs = (Current Report()["choose column"]<< get scriptable object);

setUpTableSelect = Function({x},
	Print( 1 );
	pct = Report( pc )[Table Box( 1 )];
	pct << set click sort( 1 );
	Try( pct[Number Col Box( "Cpm" )] << delete( 1 ) );
		
	Wait( 0 );
	pct << set height( 250 );
	win1 << move window( 0, 0 );

	pct << set row change function(
		Function( {this},
			selRow = this << get selected rows();
			If( N Items( selRow ) > 1,
				Throw( "Only select a single row" ),
				Show( col1 = dt << get selected columns() );
				cs << set current( Char( col1[1] ) );
			);
			dt << clear column selection();
		)
	);
);

setUpTableSelect(1);


rs = dt << make row state handler( setUpTableSelect ); 

 

matth1
Level IV

Re: Error: current column could not be found in the platform

Thank you both @hogi and @SDF1! That has helped. I didn't think to consider that multiple repetitions of the link platform command would cause problems.

SDF1
Super User

Re: Error: current column could not be found in the platform

Hi @matth1 ,

 

  I'm not entirely sure why this works, but I also made some slight modifications to your code and moved the link platform call outside of the setUpTableSelect call and within the Epxr() containing the new window (but not inside the new window call). This seems to correctly apply the Data Filter when switching between lots and avoids the errors.

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
dt << clear column selection() << clear select();
dt << Data Filter( Mode( Select( 0 ), Include( 1 ) ), Add Filter( columns( :lot_id ), Display( :lot_id, N Items( 13 ) ) ) );

colList = {:NPN1, :PNP1, :PNP2, :NPN2, :PNP3};

setUpTableSelect = Expr(
	pct = Report( pc )[Table Box( 1 )];
	pct << set click sort( 1 );
	//cs << link platform( dist1 );
	Try( pct[Number Col Box( "Cpm" )] << delete( 1 ) );
		
	Wait( 0 );
	pct << set height( 250 );
	win1 << move window( 0, 0 );

	pct << set row change function(
		Function( {this},
			selRow = this << get selected rows();
			If( N Items( selRow ) > 1,
				Throw( "Only select a single row" ),
				Show( col1 = dt << get selected columns() );
				cs << set current( Char( col1[1] ) );
			);
			dt << clear column selection();
		)
	);
);


WinExpr = Expr(
	win1 = New Window( "Parametric Test Summary Report",
		pc = dt << Process Capability(
			Process Variables( Eval( colList ) ),
			Moving Range Method( Average of Moving Ranges ),
			Capability Box Plots( 0 ),
			Within Sigma Summary Report( 1 ),
			Goal Plot( 0 ),
			Capability Index Plot( 0 ),
			Process Performance Plot( 0 ),
			Automatic Recalc( 1 ),
			SendToReport( Dispatch( {"Within Sigma Capability Summary Report"}, "", TableBox, {Sort By Column( 14, 1 )} ) )
		),
		tb = Text Box(
			" Parameter distribution will appear below here. Select a row to show distribution for that parameter. \!N",
			<<set wrap( 1000 )
		),
		H List Box(
			cs = Eval(
				Substitute(
						Expr(
							dt << Column Switcher( _ColList_, Eval( colList ), Close Outline( 1 ) )
						),
					Expr( _ColList_ ), Name Expr( ColList[1] )
				)
			),
			dist1 = dt << Distribution(
				Stack( 1 ),
				Automatic Recalc( 1 ),
				Continuous Distribution(
					Column( Eval( colList[1] ) ),
					Horizontal Layout( 1 ),
					Histogram( 1 ),
					Vertical( 0 ),
					Outlier Box Plot( 0 ),
					Count Axis( 1 ),
					Process Capability( Use Column Property Specs )
				)
			)
		)
	);
	
	cs << link platform( dist1 );
	
	setUpTableSelect;
	
	pct << set selected rows( [1] );
	win1 << Bring Window To Front;
	f = Function( {a},
		setUpTableSelect
	);
	rs = dt << make row state handler( f );
	
);

WinExpr;

Hope this helps!,

DS

hogi
Level XI

Re: Error: current column could not be found in the platform

The explanation:

 

If 

cs << link platform( dist1 );

is part of setUpTableSelect it will be executed with every table update.
But it is set up such that :NPN1 will be replaced by any of the other columns. This just works if :NPN1 is used in the distribution platform at this exact moment. If not, you will see an error message.