Process Capability of a Column Group<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I'm trying to write a table script to run a process capability analysis on a group of columns. I have a column group called "Specced Columns". I've tried various permutations of the following:
dt = Current Data Table();
foo = dt << get column group( "Specced Columns");
Process Capability(
Process Variables(
eval(foo)
),
,
Within Sigma Summary Report( 1 ),
Goal Plot( 0 )
);
I've tried converting the names to a string, list, etc. No matter what I try, I get the following error:
Specified Column not found in data table. in access or evaluation of 'List' , {/*###*/foo}
Process Capability cannot be launched because none of the processes can be found in the data table.
Any help is much appreciated!
Re: Process Capability of a Column GroupThis works for me!
Thanks very much for replying.
Re: Process Capability of a Column GroupThis also works! I like this method because I then have the column list as an expression to use elsewhere.
Thank you very much for replying.
Re: Process Capability of a Column GroupHello,
Another workaround is to build the Process Variables() argument using expressions.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
dt << Group Columns( "ColGroup", :NPN1, 5 );
foo = dt << Get Column Group( "ColGroup" );
/* Initialize the Process Variables() expression */
pvExpr = Expr( Process Variables() );
/* Loop through each list item and insert it into the expression */
For( i = 1, i <= N Items( foo ), i++,
Insert Into( pvExpr, foo[i] )
);
/* Use the Process Variables() expression in the platform */
obj = Eval(
Eval Expr(
Process Capability(
Expr( Name Expr( pvExpr ) ),
Within Sigma Summary Report( 1 ),
Goal Plot( 0 )
)
)
);
I hope that helps!
Wendy
Re: Process Capability of a Column GroupI tried several methods in an attempt to get your code to run, and did not come up with a clean answer. However, the following code does work, even though it isn't a very clean answer.
Names Default To Here( 1 );
dt = Current Data Table();
foo = dt << get column group( "Specced Columns" );
// Build the required statement as a literal string
TheStmt = "dt << Process Capability( Process Variables(" || Char( foo[1] );
For( i = 2, i <= N Items( foo ), i++,
TheStmt = TheStmt || "," || Char( foo[i] )
);
TheStmt = TheStmt || "), Within Sigma Summary Report( 1 ), Goal Plot( 1 ));";
// Run the created literal string
Eval( Parse( TheStmt ) );