How about setting the 0 values to missing with something like this:
Names Default To Here(1);
dt = New Table("Untitled 2",
Add Rows(2),
Compress File When Saved(1),
New Column("col", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2]))
);
//both
minVal = 1;
maxVal = 2;
Eval(
Substitute(
Expr(
dT:col << set property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
),
Expr( _L ), If(minVal == 0, ., minVal)
,
Expr( _U ), If(maxVal == 0, ., maxVal)
)
);
Show(dt:col << Get Property("Spec Limits"));
//missing maxval
minVal = 1;
maxVal = .;
Eval(
Substitute(
Expr(
dT:col << set property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
),
Expr( _L ), If(minVal == 0, ., minVal)
,
Expr( _U ), If(maxVal == 0, ., maxVal)
)
);
Show(dt:col << Get Property("Spec Limits"));
//maxval 0
minVal = 1;
maxVal = 0;
Eval(
Substitute(
Expr(
dT:col << set property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
),
Expr( _L ), If(minVal == 0, ., minVal)
,
Expr( _U ), If(maxVal == 0, ., maxVal)
)
);
Show(dt:col << Get Property("Spec Limits"));
-Jarmo