Hello,
I want to make a capability script by letting the user choose on which parameter he wants to perform the capability analysis.
I have a combo box which offers all the possible parameters and I retrieve the user's choice in the choiceCapa variable. The user must also manually enter the values for the lower and upper limits and the target.
Text Box("Veuillez choisir un paramètre :"),
comboCapa = Combo Box (columns_table_ref, choixCapa = comboCapa << Get Selected),
Text Box("Veuillez renseigner les paramètres suivants :"),
Text Box("Limite inférieure :"),
lim_inf_neb = Number Edit Box(),
Text Box("Objectif :"),
obj_neb = Number Edit Box(),
Text Box("Limite supérieure :"),
lim_sup_neb = Number Edit Box(),
okCapa = Button Box ("Valider", capacite)Then I have a script that plots the capability:
capacite = expr(
lim_inf = lim_inf_neb << get;
lim_sup = lim_sup_neb << get;
obj = obj_neb << get;
Process Capability(
Process Variables(As Column(choixCapa) ),
Spec Limits( As Column(choixCapa)( LSL( lim_inf ), Target( obj ), USL( lim_sup ) ) ),
Moving Range Method( Average of Moving Ranges ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0, Capability Lines( 1.0217 ), Show Overall Sigma Points( 0 ) ),
Capability Index Plot( 0 ),
Process Performance Plot( 0 ),
SendToReport(
Dispatch(
{"Individual Detail Reports", choixCapa||" Capability", "Histogram"},
"Process Capability Analysis Histogram",
FrameBox,
{Frame Size( 311, 19 )}
),
Dispatch(
{"Individual Detail Reports", choixCapa||" Capability", "Histogram"},
"Process Capability Analysis Histogram",
FrameBox( 2 ),
{Frame Size( 311, 160 )}
)
)
)
);I have an error at the Process Variables row where I specify the column name which is the user's input:
The specified column could not be found in the data table. when accessing or evaluating "List", {/ * ### * / choisCapa}
I don't know how to transform my input into an understandable column name to plot the capability ...
Thank you in advance for your answers
Try if using Eval() instead of AsColumn() helps.
If not then you might have to resort into something like Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute