@Aam_jmp,
I have tested this code using tables try and join. You can expand it appropriately to include try1 if needed.
Clear Log(); Clear Globals();
// Open Data Tables
dt1 = Open(FilePath1); // Where FilePath1 points to your file location for JOIN table
dt2 = Open(FilePath2); // Where FilePath2 points to your file location for try table
// Get Y values from main table
YVals = dt1:Y << Get Values;
// Get Col values from second table
ColVals = dt2:Col << Get Values;
// Loop through the values
for(i = 1, i <= N Items(YVals), i++,
for(r = 1, r <= N Items(ColVals), r++,
If(Contains(ColVals[r],YVals[i]),
ColVals[r] = YVals[i];
);
);
);
// Assign Corrected Values back to dt2
dt2 << New Column("CorrectedCol",Character,Continuous, << Set Values(ColVals));
// Join Tables
dt_Intermediate = dt1 << Join(With(dt2 ),
Select( :Y, :Quan Reqd ),
SelectWith( :Value ),
By Matching Columns( :Y = :CorrectedCol ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 )
);
// Remove Duplicates
dt_Results = dt_Intermediate << Summary(
Group( :Y, :Quan Reqd, :Value ),
Freq( "None" ),
Weight( "None" )
);
Best
Uday