cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Salil
Level I

spec limits jsl script

Hi,

I tried to write a jsl script for reading in spec limits from a table to columns in another data table, based on discussions in this community. Pasted below is the script, and the corresponding data and spec limits tables are attached.

 

I am not sure what I am doing wrong, but when I check the column properties of the data table after running the script, the Spec Limits fields are still blank. Can someone please let me know what I am doing wrong? Thanks in advance.

 

Names Default To Here( 1 );

dt = Open("test1.jmp");

dt1 = Open("test1_spec.csv");

dt << current data table ();

x = dt << Get Column Names(string);
y = dt1 << Get Column Names(string);

ncols = N Items (x);

for (i=1, i<=ncols, i++,
	v = Column(i) << Get Name;
	z = (Loc(y,v)) [1];
	dt1 << current data table();
	uLimit = Column(z)[1];	
	lLimit = Column(z)[2];
	tLimit = Column(z)[3];
	dt << current data table ();
	Eval(
		Eval Expr(
		Column(dt,char(x[i])) << Set Property(
			"Spec Limits",
			{LSL( Expr( lLimit ) ), USL( Expr( uLimit ) ), Target( Expr( tLimit ) ),
			Show Limits( 1 )}
		)
	)
)
);

test_spec (spec limits table):

Descriptionacd
USL112542
LSL012.5
TT51123

 

test1 (data table):

abcd
1324
2648
39612
412816
5151020
6181224
7211428
8241632
9271836
10302040
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: spec limits jsl script

Take a look at the File Exchange Addin called 

Write Limits to a Data Table from a Limits Table.  The assumed format of the input limits data table is different than your specified structure, however, you could easily either change your structure, or modify the JSL from the addin

 
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: spec limits jsl script

Take a look at the File Exchange Addin called 

Write Limits to a Data Table from a Limits Table.  The assumed format of the input limits data table is different than your specified structure, however, you could easily either change your structure, or modify the JSL from the addin

 
Jim