Hi all,
From my previous post, i face the subset data problem. I using the hard coding to list down the subset data table one by one.
But now i want dynamic the code, one of the reason that i don't want list down one by one(hard coding ) is if in future I have 50 F D in one dataset, so is impossible to me to list down the F D one by one right?
I try using the script below, but still have errors, and it only print the first f_d's subset data table for me only.
So, how can i do it to iterate until the 5 f_d?(because now i have 5 f_d)
Thanks.
dt = Open( <path to open data table>);
// Change the column name "F D" to "f_d"" to match the example
dt:F D << set name( "f_d" );
a = {"S_GX_F40", "S_GX_Z40","S_III_E110","S_III_E80","S_III_SL150"};
dt << Select Where( Starts With( :f_d, a[1] ) );
baseDT = dt << Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ) );
For( i = 1, i <= N Items( a ), i++,
dt << Select Where( Starts With( :f_d, a ) );
TempDT = dt << Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ) );
baseDT = baseDT << concatenate( TempDT, append to first table( 1 ) );
Close( TempDT, nosave );
);