[JSL Bug] Got problem when try to concatenate two tables from different directoryHi All,
I'm a new user in JMP scripting and need help to find bugs in my code.
What I'm trying to do here is to concatenate already opened data files (dt1 and dt2). I found that the script did not concatenate the two tables. line 41 and so on was not executed plus with no error message
Can anyone help me with it?
Thanks

ScriptingRe: [JSL Bug] Got problem when try to concatenate two tables from different directory...normally I'd name these variables differently:
dt1Name = "c:\...data.jmp";
dt1 = open(dt1Name);
so the name better describes the contents of the variable. Sometimes I reuse variables, but it usually causes me to make mistakes.
Re: [JSL Bug] Got problem when try to concatenate two tables from different directoryLook in the log and you'll see the show before the assignment is a string, and after the assignment is a data table.
Re: [JSL Bug] Got problem when try to concatenate two tables from different directoryyeah it works! and why you put "show" two times?Re: [JSL Bug] Got problem when try to concatenate two tables from different directoryThis works fine:
Names Default To Here(1);
dt1_dir = Pick Directory("Pick dir", "$SAMPLE_DATA/");
dt1 = Pick File(
"Select JMP File",
dt1_dir,
{"JMP Files|jmp;jsl;jrn", "All Files|*"},
1,
0,
0
);
Show(dt1);
dt1 = Open(dt1);
Show(dt1);
dt2_dir = Pick Directory("Pick dir", "$SAMPLE_DATA/");
dt2 = Pick File(
"Select JMP File",
dt2_dir,
{"JMP Files|jmp;jsl;jrn", "All Files|*"},
1,
0,
0
);
Show(dt2);
dt2 = Open(dt2);
Show(dt2);
concat_dt = dt1 << Concatenate(dt2,
Output Table("Concat datatable"),
Create Source Column
);Do similar changes to your code and check if it works (check Concatenate())
Re: [JSL Bug] Got problem when try to concatenate two tables from different directoryI did reassign dt1 and dt2. But it didn't workRe: [JSL Bug] Got problem when try to concatenate two tables from different directoryI think you will have to reassign dt1 and dt2 to open command after Pick File as Pick File will return path to the picked file.
Names Default To Here(1);
dt1 = Pick File(
"Select JMP File",
"$DOCUMENTS",
{"JMP Files|jmp;jsl;jrn", "All Files|*"},
1,
0,
"newJmpFile.jmp"
);
dt1 = Open(dt1);