I open 2 excel files.I am trying to join tables only if the the list contains choice.How do I achieve this?
//Accept Product input from user and save it in a text file
R = Open("Choice.txt",
Labels(0),
Columns(
C = Character(12);
)
);
Choice = {};
Choice = R:C[1];
//Open master data list
U = Open("Volume.csv","invisible");
T = Open("List.csv","invisible");
dt = Current data table();
Column_List = dt << Get Column Names("String");
for(i = 1, i<= NItems(Column_List),i++,
if(contains(Choice,Column_List[i]),
U = Data Table( "Volume" ) <<
Join(
With( Data Table( "List" ) ),
Merge Same Name Columns,
By Matching Columns( :number = :number ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 ),
Output Table( "Joined_With_List" )
);
);
);