Hi All,
I imported csv files into JMP to get data table (assigned as dt0) and spec table (assigned as dt1) respectively. I wonder to get the spec in spec table (dt0) and set Spec Limits of columns in data table (dt0).
The issue I found that the specs can not be set successfully:
Here are my codes:
Names Default To Here( 1 );
Files = Pick File(
"Select CSV File",
"$Downloads",
{"JMP Files|jmp;jsl;jrn", "All Files|*"},
1,
0,
""
);
dt0 = Open(
Files,
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 2 ),
Data Starts( 8 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
);
dt1 = Open(
Files,
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 2 ),
Data Starts( 5 ),
Lines To Read( 2 ),
Year Rule( "20xx" )
)
);
For(i=13, i<=N Cols(dt0), i++,
Column(dt0,i)<<Data Type(Numeric);
Column(dt0,i)<<Modeling Type("Continuous");
);
For(i=13, i<=N Cols(dt1), i++,
Column(dt1,i)<<Data Type(Numeric);
Column(dt1,i)<<Modeling Type("Continuous");
);
For(i=13, i<=N Cols(dt1), i++,
tempUSL=Col Stored Value(dt1, i, 1); //Assign the spec from dt1 spec table to 'tempUSL' and 'tempLSL'
tempLSL=Col Stored Value(dt1, i, 2);
Eval(
Eval Expr(
Column( dt0,i ) << Set Property(
"Spec Limits",
{LSL( Expr( tempLSL ) ), USL( Expr( tempUSL ) ), Show Limits( 1 )}
)
)
);
);
Any advice to address this issue? Thanks