I figured out the script:
dt = {Data Table ("X"), Data Table ("Y"), Data Table ("Z")};
// Start with the first table as base
joinedDT = dt[1];
// Sequentially join each remaining table to the accumulated result
For(i = 2, i <= N Items(dt), i++,
tmpDT = joinedDT << Join(
With(responseTables[i]),
Drop Multiples(1,1),
Include Nonmatches(0,0),
Merge Same Name Columns,
Preserve Main Table Order(1)
);
// Rename the intermediate table
tmpDT << Set Name("Intermediary Data Table");
// Replace joinedDT with the newly joined table for next iteration
joinedDT = tmpDT;
);
I wished there were more information in the scripting index about this part of the Join function:
Drop Multiples(1,1),
Include Nonmatches(0,0),
Merge Same Name Columns,
Preserve Main Table Order(1)
I had to go trial and error to figure it out!