I would do this by utilizing SQL. This example should give an idea what you can do, you will have to do some cleanup on the values though
Names Default To Here(1);
dt_main = Open("$DOWNLOADS/maintable(1).jmp");
dt_ref = Open("$DOWNLOADS/referencetable(1).jmp");
dt_concat = Query(
Table(dt_main, "t1"),
"\[SELECT type, "X Coord", "Y Coord", "Wafer ID", GROUP_CONCAT(Value, ', ') as Value
FROM t1
group by type, "X Coord", "Y Coord", "Wafer ID"
]\"
);
dt_split = dt_concat << Split(
Split By(:Type),
Split(:Value),
Group(:X Coord, :Y Coord, :Wafer ID)
);
dt_ref << Update(
With(dt_split),
Match Columns(:X Coord = :X Coord, :Y Coord = :Y Coord, :Wafer ID = :Wafer ID),
Add Columns from Update Table(:A, :B),
Replace Columns in Main Table(None)
);
Add Listagg/Concatenate/GROUP_CONCAT to Summary platform for a wishlist which should make this very easy
Edit:
Casting seems to be fairly simple way to get rid of the decimals
View more... (Highlight to read)
Names Default To Here(1);
dt_main = Open("$DOWNLOADS/maintable(1).jmp");
dt_ref = Open("$DOWNLOADS/referencetable(1).jmp");
dt_concat = Query(
Table(dt_main, "t1"),
"\[SELECT type, "X Coord", "Y Coord", "Wafer ID", GROUP_CONCAT(CAST(Value as int), ', ') as Value
FROM t1
group by type, "X Coord", "Y Coord", "Wafer ID"
]\"
);
dt_split = dt_concat << Split(
Split By(:Type),
Split(:Value),
Group(:X Coord, :Y Coord, :Wafer ID)
);
Close(dt_concat, no save);
dt_ref << Update(
With(dt_split),
Match Columns(:X Coord = :X Coord, :Y Coord = :Y Coord, :Wafer ID = :Wafer ID),
Add Columns from Update Table(:A, :B),
Replace Columns in Main Table(None)
);
Close(dt_split, no save);
Names Default To Here(1);
dt_main = Open("$DOWNLOADS/maintable(1).jmp");
dt_ref = Open("$DOWNLOADS/referencetable(1).jmp");
dt_concat = Query(
Table(dt_main, "t1"),
"\[SELECT type, "X Coord", "Y Coord", "Wafer ID", GROUP_CONCAT(CAST(Value as int), ', ') as Value
FROM t1
group by type, "X Coord", "Y Coord", "Wafer ID"
]\"
);
dt_split = dt_concat << Split(
Split By(:Type),
Split(:Value),
Group(:X Coord, :Y Coord, :Wafer ID)
);
Close(dt_concat, no save);
dt_ref << Update(
With(dt_split),
Match Columns(:X Coord = :X Coord, :Y Coord = :Y Coord, :Wafer ID = :Wafer ID),
Add Columns from Update Table(:A, :B),
Replace Columns in Main Table(None)
);
Close(dt_split, no save);
-Jarmo