Not as eloquent as Jarmo's, but it shows a different approach
Names Default To Here( 1 );
dt = New Table( "Example",
Add Rows( 7 ),
Compress File When Saved( 1 ),
New Column( "SN",
Character,
"Nominal",
Set Values( {"1", "2", "3", "3", "5", "6", "6"} )
),
New Column( "Material Lot",
Character,
"Nominal",
Set Values( {"A1", "A2", "A3", "A4", "A5", "A6", "A7"} )
)
);
dtCombine = dt << Summary(
Group( :SN ),
Freq( "None" ),
Weight( "None" ),
Link to original data table( 0 )
);
dtCombine << New Column( "Material Lot",
Character,
set each value(
Eval(
Eval Expr(
Concat Items(
dt:Material Lot[dt <<
get rows where( dt:SN == Expr( dtCombine:SN[Row()] ) )],
", "
)
)
);
)
);
Jim