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 |
Weight | 10 | 30 | 60 |
Height | 30 | 45 | 60 |
Hardness | 0 | 5 | 10 |
Then, your table of each of your products/items that you measure might look like this:
Lot Number | Weight | Height | Hardness |
010 | 20 | 37 | 7 |
020 | 40 | 22 | 9 |
030 | 50 | 50 | 3 |
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