I have a script that had been working in JMP 10 but now is not with JMP 11. Someone else created this script so I'm learning my way through it. The portion of the script that is causing problems is pasted below. More specifically, I believe it is in the portion highlighted blue. Any ideas??
ChronJoin=Function({}, //02
//Joins data in the chronological order
for( f = 2, f <= N Items(ShortList), f++,
try(
dt = open(directory || ShortList
/*catch*/
print("Error 002a: Unrecognized file type "|| ShortList
throw();
);
if(!contains(column name(1), "Date"), //if the column name of column one is not Date
RowRemove("Date", 1, "Time", 2); //removes headers
ColumnRename(ShortList
);
FixRawSecondsName();
ColumnFormat(); //sets the correct data types for the columns
if(N Items(MultiVarCheckBox << Get Selected())!=0,
MultiVarColumn(ShortList
);
if(N Items(HALTlinesCheckBox << Get Selected())!=0, //Verticle Reference Lines selected
if(TestTypeRadioBox << Get()==1, //HALT
HALTstages(ShortList
/*else if*/TestTypeRadioBox << Get()==4,
SAstages(ShortList
);
);
try( //if dt cannot be joined, an error is printed to the log and the script is stopped
dtPrev = dtMain;
dtMain = dtMain << Join(
With(dt),
Merge Same Name Columns,
Copy Formula(0),
Suppress Formula Evaluation(0),
By Matching Columns(:Date == :Date, :Time == Time), //joins by matching Dates and Times
Drop Multiples (1, 1),
Name("Include non-matches")(1, 1),
Output Table Name("Digital" || char(f), nosave);
),
/*catch*/
print("Error 002b: Failure to join "||ShortList
throw(); //ends current script sequence
);
close(dt, nosave ); //closes the recently opened data table
close(dtPrev, nosave); //closes the previous data table
);
while(contains(column name(1), "Match Flag"),
dtMain << Delete Columns("Match Flag");
);
);
I have not studied your code at all closely but I do notice that in this line:
By Matching Columns(:Date == :Date, :Time == Time), //joins by matching Dates and Times
there is no colon in front of the second reference to Time.
Thanks mpb for catching that. I made the correction however that did not resolve it.
Look in the log and tell us what the error message says.
The only message in the log is what the script is printing to the log. It failing to join the two files together. I am able to manually join the files together.
/*catch*/
print("Error 002b: Failure to join "||ShortList
throw(); //ends current script sequence
);
In the manually joined table, click on the little red triangle next to Source, then click Edit. Compare that JSL code to the code you have listed here.
PMroz, I took your suggestion and found the difference. It worked in JMP 10 as the following:
dtMain = dtMain << Join(
I am able to make it work in JMP 11 with:
dtMain = Data Table (dtMain) << Join(
Thanks for the help!