Hi,
I am trying to extract column spec limits so I can use in a custom report but I am getting some odd behaviour. Below is a snippet of what I'm doing:
Clear Globals();
dt = Data Table( "blah" );
cols1 = dt << Get Column Names( numeric, continuous );
For( jj = 1, jj <= N Items( cols1 ), jj++,
spec_x = cols1[jj] << Get Property( "Spec limits" );
Print(
Char( jj ) || ": Col is " || Char( cols1[jj] << get name ) ||
", LSL is " || Char( spec_x["lsl"] ) ||
", USL is " || Char( spec_x["usl"] )
);
);
The print statement is not the real end use, but it serves to show if I've extracted the limits in a useful manner!
Now, this code works fine for a tiny test table of 2 columns:
"1: Col is X, LSL is 1, USL is 2"
"2: Col is Y, LSL is 3, USL is 7"
Which matches what is in my table. But for a larger table of 73 (numeric, continuous) columns, for some reason it fails to put anything into spec_x, I just get:
"1: Col is Rc_N+PO (N/.09/280), LSL is ., USL is ."
"2: Col is Rc_V1 (N/.1/1260), LSL is ., USL is ."
"3: Col is Rc_V2 (N/.1/1188), LSL is ., USL is ."
"4: Col is Rc_V3 (N/.1/1188), LSL is ., USL is ."
"5: Col is Rc_V4 (N/.1/1188), LSL is ., USL is ."
... etc
There is definitely limit data in the table, I have double checked! So is there any reason why it might not be working? The table is open, the script is clearly getting the column names OK, I just can't make it pick up the limits.
When I step though the script and get to spec_x = cols1[jj] << Get Property( "Spec limits" ); the log shows:
Spec Limits( LSL( 10 ), USL( 50 ), Target( 30 ) )
but then when I execute the print statement, it just says:
"1: Col is Rc_N+PO (N/.09/280), LSL is ., USL is ."
Any help appreciated!
Thanks,
Matthew.