There might be some misunderstanding here. Doing x << Concatenate( x, y )
will not update x
, it will create a new table.
To update x
with the values of y
, use the literal expression x << Concatenate( y, "Append to First Table" )
Also, think about doing all this as private tables to conserve resources, then at the end show the table, like this:
Names Default To Here( 1 );
dirLoc = Pick Directory( "Select a directory", "myDirectory\" );
fileList = Files In Directory( dirLoc );
dt1 = Open( dirLoc || fileList[1], Private );
dt1 << Select Where( :Amount >= 500 );
x = dt1 << Subset( Output Table Name( "T1" ), Private );
Close( dt1, NoSave );
For( i = 2, i <= N Items( fileList ), i++,
dt = Open( dirLoc || fileList[i], Private );
dt << Select Where( :Amount >= 500 );
y = dt << Subset( Output Table Name( "Temp" ), Private );
x << Concatenate( y, "Append to First Table" );
Close( dt, NoSave );
Close( y, NoSave );
);
x << Set Name( "Result" );
x << New Data View;
Jordan