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
Claus_Jensen
Level I

Setting limits from a specific cell to the column property

Hi All

 

I have som problems in getting the code below to set the limits in the column properties 

it set a spec limits but is is set to 0.0 and not the value in row 4 and 5 of the column

 

is there any of you that can help

for(c=2, c<=NCol(dt), c++, Column(dt, c) << Set Property("Spec Limits", Spec Limits(Show Limits(1))));
for(c=2, c<=NCol(dt), c++, Column(dt, c) << Set Property("Spec Limits", Spec Limits(LSL(Column(dt, c)[4]))));
for(c=2, c<=NCol(dt), c++, Column(dt, c) << Set Property("Spec Limits", Spec Limits(USL(Column(dt, c)[5]))));
1 REPLY 1
SDF1
Super User

Re: Setting limits from a specific cell to the column property

Hi @Claus_Jensen ,

 

  A lot of the time, when you set the property Spec Limits, you need to do it in a special kind of way. You might consider reading over the post here, or here, where the original first link was about something else, but they too wanted to assign spec limits to a column.

 

  Often, you have to do it like the following:

 

//define your spec limits
_LSL_ = 0;
_USL_ = 100;
_Target_ = 20;

//assign the spec limits to the column of interest
Eval( Eval Expr( Column( dt, C ) << Set Property( "Spec Limits", {LSL( Expr( _LSL_ ) ), USL( Expr( _USL_ ) ), Target( Expr( _Target_ ) )} ) ) );

 

In the above example, the variables for the spec limits are _LSL_ and so forth, and must be evaluated as Expr(_LSL_) in the <<Set Property() command.

 

  If you don't want to define your spec limits in the JSL code, but instead have them as a column, say :"LSL"n, where the first element is the value, then :"LSL"n[1]=0 (or whatever). You might also look into "managing spec limits" with JMP here. I use this process a lot, and you can have it all scripted up. It makes it much easier to build a data table where each row is a property of your item/product, this is "Column 1", then you have columns _LSL, _Target, and _USL, and as long as the rows in Column 1 match with the column names of your table of products, then you can easily assign spec limits to the columns all by scripting it. For example, your spec table might look like the one below:

Column 1_LSL_Target_USL
Weight103060
Height304560
Hardness0510

 

Then, your table of each of your products/items that you measure might look like this:

Lot NumberWeightHeightHardness
01020377
02040229
03050503

 

Then, by using the Manage Spec Limits, you can easily assign the specs from the spec data table to the product/item data table. For me, this helps when I generate large data table for our products and want to automate the process after reading in data files.

 

  Anyway, by using the example at the top, where you define the spec limits and use the Eval(Eval Expr(Expr())) will definitely get you what you need.

 

Hope this helps!,

DS