Data table order is commingledHi folks,
I have three FRF (txt style) files to be imported into JMP, and I had the following script to import and process the data. I have one description table that has three description items, which need to be assigned to the FRF data table in an ascending order. For example:
z-ht_0.414 needs to be assigned to ccf_23101106.FRF
z-ht_0.464 needs to be assigned to ccf_23101703.FRF
z-ht_0.514 needs to be assigned to ccf_23101701.FRF
The problem of my script ends up opening ccf_23101703 later than ccf_23101701. As a result, the z-ht_0.514 is assigned to the second data table ccf_23101703 instead of the third data table ccf_23101701. It shows that ccf_101703 is the data table window opened last, but in my script, ccf_101703 should be the second data table window opened. Can anyone help explain this weird thing and provide a solution to my question? I have copied my script below and attached the raw data. Please let me know if you need further information. Thanks.
//-----------------------------------------------------------------------------------------------------------------
Names Default To Here( 1 );
Clear Globals();
Description = New Table( "Description",
Add Rows( 0 ),
New Column( "Descriptioin",
Character,
set values(
{
//==========================================================================
// Manual input #1: the description of the FRF data (need to keep the colon)
//==========================================================================
"z-ht_0.414", "z-ht_0.464", "z-ht_0.514"}
)
)
);
FRF_file_num = N Rows( Description );
dtList = Multiple File Import(
<<SET folder=""></SET>
Automation and ScriptingData AccessData Blending and CleanupRe: Data table order is commingledtry adding
current data table() << rerun formulas;
after the input JSL for the txt file.
Re: Data table order is commingledHi Jim,
Thank you for looking into my case. Your above suggestion seems not solving my problem. My problem is when I import multiple files into JMP, the importing action does not follow the order of the files that I list. For example, when I try to import the following files:
ccf_008, ccf_005, ccf_007, ccf_002 in this order, but JMP will automatically sort the names of the files and generate the data table windows in the this order: ccf_002, ccf_005, ccf_007, ccf_008, which is not the order I want. Is there anyway that I can keep the order of the files because I need to assign the description to the files respectively? If the order is messed up, all of the data will be mistakenly labeled. Thank you.
Re: Data table order is commingledIf I am understanding the issue correctly, I forced the processing by inputting only one file at a time. See my JSL below
//-----------------------------------------------------------------------------------------------------------------
Names Default To Here( 1 );
Clear Globals();
Description = New Table( "Description",
Add Rows( 0 ),
New Column( "Descriptioin",
Character,
set values(
{
//==========================================================================
// Manual input #1: the description of the FRF data (need to keep the colon)
//==========================================================================
"z-ht_0.414", "z-ht_0.464", "z-ht_0.514"}
)
)
);
dtList = {};
FRF_file_num = N Rows( Description );
fileList = {"ccf_23101106.frf.txt", "ccf_23101703.frf.txt", "ccf_23101701.frf.txt"};
For Each( {file}, fileList,
dt = Multiple File Import(
<<SET folder=""></SET>Re: Data table order is commingledHi Jim,
Perfect. It is what I am looking for. Learned a lot from your script. Thanks for the quick turnaround.