Hello All,
i was hoping that someone can help me with Modal, previously i was calculating FV in my JMP script as follows:
Finalivc2 << New Column( "Runs", Numeric, Continuous );
:Runs<<set each value(2);
Finalivc2 << New Column( "Replicates per Run", Numeric, Continuous);
:Replicates per run<<set each value(1);
Finalivc2 << New Column( "Format Variability %GCV", Numeric, Continuous, Formula( ((2^root(((:IR)/(:Runs)+(:Residual)/(:Replicates per Run*:Runs)),2))-1)*100 ), Format( "fixed dec", 4, 1 ) );
which worked OK, although on ocassions i would forget to update the :Runs and :Replicates per run parameters which gave me some grief, i decided to automate this process using modal as follows
FV_param = New Window ("Format Variability Parameters", << Modal, << Return Result,
Text Box ("Select Format Variability Parameters"),//Create the display box
HListBox(
LineupBox (NCol (2),
Text Box ("Runs NOT REPLICATES"), Runs = numberEditBox(2),
Text Box ("Replicates NOT RUNS"), Replicates per Run = numberEditBox(1),
), // end of lineupbox
LineupBox ( NCol (1), ButtonBox ("OK"), ButtonBox ("Cancel"))
) // end HListBox
);
show (FV_param, FV_param ["Runs"], FV_param ["Replicates per Run"],
FV_param ["Button"] );
If (FV_param ["Button"] == -1,
Caption (" Wait...Aborting..."); Wait (3) ; Caption(Remove); Throw());
StatusMsg ("Processing next steps");
RemoveFrom (FV_param, NItems(FV_param)); // Removes the last item "Button 1" from the assignment list
Eval List(FV_param); // the assignment from the display box
Eval(
Substitute(
Expr( Finalivc2 = New Column( "Runs", Numeric, "Continuous", Format( "Best", 12 ),
Expr( Finalivc2 = New Column( "Replicates per Run", Numeric, "Continuous", Format( "Best", 12 ),
)
),
Expr( __FV_param__ ), Runs, Replicates per Run
)
)));
Finalivc2 << New Column( "Format Variability %GCV", Numeric, Continuous, Formula( ((2^root(((:IR)/(:Runs)+(:Residual)/(:Replicates per Run*:Runs)),2))-1)*100 ), Format( "fixed dec", 4, 1 ) );i have no doubt i am doing the evaluating and substituting incorrectly, i am not getting the variables runs and Relicates per run in the table, and its then not doing the calculation, can anyone please offer some help
Thanks