I'm having significant issues trying to run a series of JSL scripts in JMP 14 on a colleagues terminal that worked in JMP 13. The following issues have arisen:
- dt = Current Data Table() only seems to be working once. I have to keep identifying what dt is or change dt << to Current Data Table () <<.
- My BatchID tag keeps failing, with the following error:
Column BatchID Formula Interrupted
Name Unresolved: Group 1 times At rows: 2 Operation: Group, Group/*###*/
Formula evaluation errors have been ignored - The above error happens with each of the tags group/year/week, if I remove the previous tag variable.
Clear Symbols();
//Before running this script, be sure to Recode any problems in the AliasName column.
//Enter the abbreviation for your Group, the year "YY", and the Week # "WW" for the experiment.
New Window("Experiment Details",
<<MODAL></MODAL>I can post a snippet of data table if needed.
See Code posted below
Jeff, thanks for the advice regarding syntax, I will incorporate this into future scripting. I'm still not sure what's going on previously in the script that is causing the BatchId tag to fail. I'm still waiting on my access to JMP 14 so I can test the code on my own machine.
I'm sorry that you're having difficulty here.
In general, it's not a good practice to rely on Current Data Table(), and it's usually pretty easy to avoid.
In your specific case, you're counting on the result of your Split becoming the current data table. As you've discovered, that's not guaranteed.
dt << Split( Split By( :Loops ), Split( :PV ), Group( :Datetime, :BatchID ), Remaining Columns( Keep( :EFT ) ) );
Instead you should capture the result of the Split into your variable, dt.
dt = dt << Split(
Split By( :Loops ),
Split( :PV ),
Group( :Datetime, :BatchID ),
Remaining Columns( Keep( :EFT ) )
);
//This sorts the data according to BatchID and then time.
//No longer need to set dt because it's already set above
//dt = Current Data Table();
dt = dt << sort( Replace table, By( BatchID ), Order( Ascending ) );