This JSL should do the trick
// Your code
datacolnames = res_thk_specs:colname << get values;
specExpr = Expr(
Column( Res_Thk_Data, name ) <<
Set Property(
"Spec Limits",
{LSL( Expr( lower ) ), USL( Expr( upper ) ),
TARGET( Expr( target ) ), Show Limits( 1 )}
)
);
For( i = 1, i <= N Rows( RES_THK_SPECS ), i++,
name = Column( RES_THK_SPECS, "COLNAME" )[i];
lower = Column( RES_THK_SPECS, "LSL" )[i];
upper = Column( RES_THK_SPECS, "USL" )[i];
target = Column( RES_THK_SPECS, "TARGET" )[i];
_unit_ = Column( RES_THK_SPECS, "UOM" )[i];
If( Contains( datacolnames, name ),
Eval( Eval Expr( specExpr ) )
);
If( Contains( datacolnames, name ),
Column( Res_Thk_Data, name ) << Set Property( "Units", eval( _unit_ ) )
);
);
Jim