Thanks so much for your help, here's my full script, I still cannot get teb1, teb2,... etc to replace sample number 01, 02,...etc. In the current script, the user input just seems to replace the values of sample name and sample number in the first row, second row etc. I would like the user input to replace sample number 01, 02, 03, 04, 05, 06 etc
dt=New Table();
dt=current data table();
current data table() << Bring Window To Front;
Wait(0);
Main Menu("Paste With Column Names");
// Change the column name
Col1=column("X-Value");
Col1<<set name("Cycle");
Col2=column("Y-Value");
Col2<<set name("Response");
// Create a new column for sample names
dt << New Column("Sample Number",Character,Formula(Left(:Sample, Length(:Sample) - 1)),EvalFormula);
dt = current data table();
Names Default To Here( 1 );
InputWindow = New Window( "Enter Input",
<<modal(),
Table Box(
String Col Box( "Sample Number",
{"Sample Number 01", "Sample Number 02", "Sample Number 03", "Sample Number 04", "Sample Number 05",
"Sample Number 06"}
),
Col Box(
"Sample Number",
teb1 = Text Edit Box( "Enter Sample Name" ),
teb2 = Text Edit Box( "Enter Sample Name" ),
teb3 = Text Edit Box( "Enter Sample Name" ),
teb4 = Text Edit Box( "Enter Sample Name" ),
teb5 = Text Edit Box( "Enter Sample Name" ),
teb6 = Text Edit Box( "Enter Sample Name" )
)
),
Button Box( "OK",
Sample Number 1 = teb1 << Get Text;
Sample Number 2 = teb2 << Get Text;
Sample Number 3 = teb3 << Get Text;
Sample Number 4 = teb4 << Get Text;
Sample Number 5 = teb5 << Get Text;
Sample Number 6 = teb6 << Get Text;
)
);
Show(
Sample Number 1,
Sample Number 2,
Sample Number 3,
Sample Number 4,
Sample Number 5,
Sample Number 6,
);
:sample number[1]=Sample Number 1;
:sample number[2]=Sample Number 2;
:sample number[3]=Sample Number 3;
:sample number[4]=Sample Number 4;
:sample number[5]=Sample Number 5;
:sample number[6]=Sample Number 6;
// Sort the samples by sample name
Sample Number<<set property(value ordering, {"Running Buffer","Std 01","Std 02","Std 03","Std 04","Std 05","Ctrl",teb1,teb2,teb3,teb4,teb5,teb6,
"07","08","09","10","11","12","13","14","15","16","17","18","19","20"});
dt << Sort(By(Sample Number),Order(Ascending),Replace Table);
// Exclude and delete any Startup Buffers and Startup Reference Samples; Cycle 1-9
dt << Select Where( Cycle <= 9);
dt << Exclude;
dt << Delete Rows;
win = New Window( "Graph", text = TextEditBox("Change Me"), text << Set Font( "Arial Black" ), text << Font Color( black ), text << Enable( 1 );
dt << Select Where( Sample Number != "Running Buffer");
dt << Exclude;
dt << Hide;
summarize(Bline=mean(:Response));
dt << Clear Row States;
dt << New Column("Blank Subtracted Response",Numeric,Formula((Response-Bline)),EvalFormula);
// Bivariated plot.
biv = Bivariate(Y( :Blank Subtracted Response ), X( :Cycle ) );
Report( biv )[Frame Box(1)] << Row Legend( Sample Number, color(1), marker(1), Marker Theme( "Solid" ));
dt << Select Where( Sample Number != "Std 03");
dt << Exclude;
dt << Hide;
Current Data Table(dt);
dt << Clear Row States;
// Normalize the data
dt << New Column("Normalized Response",Numeric,Formula(Blank Subtracted Response/Predicted Blank Subtracted Response*100),EvalFormula);
biv = Bivariate(Y( :Normalized Response ), X( :Cycle ) );
Report( biv )[Frame Box(1)] << Row Legend( Sample Number, color(1), marker(1), Marker Theme( "Solid" ));
// Create table of reportable results
Oneway(
Y( :Normalized Response ),
X( :Sample Number ),
Means and Std Dev( 1 ),
Mean Lines( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Points Spread( 1 ),
Grand Mean( 0 ));