How to script Column Matching DialogI have a dialog where I need a user to match pairs of columns. Pretty much like we do in Join Tables.

Specific example - I have sets of experimentally measured parameters and sets of their theoretical predictions. This data comes from different sources and colum naming can be arbitrary, so I need users to match theory vs experiment for each parameter.
Is there an example on how to script this part? And how to keep these pairs and how to use them later?
So far I have this, and I'm interested in how to script the box in green frame to reflect matched pairs (like in example above) and how to keep those pairs (list of 2 item lists?) and how to remove\recall them etc.:

And here is the script:
dt = New Table( "Untitled 5",
Add Rows( 4 ),
Set Header Height( 46 ),
New Column( "X", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4] ) ),
New Column( "A_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 3, 2, 3] ) ),
New Column( "B_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 6, 5] ) ),
New Column( "A_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 4, 3, 4] ) ),
New Column( "B_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 3, 4] ) )
);
notImplemented = Expr(
win = New Window( "Feature Not Implemented Yet", <<MODAL></MODAL>
ScriptingRe: How to script Column Matching DialogIf I would have to guess, join platform uses Listbox in which it appends new values when you add column pairs.
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = clb1 << get selected;
b = clb2 << get selected;
lb << Append(a[1] || "=" || b[1]);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Button Box("Match", notImplemented),
lb = List Box({}, Nlines(12))
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
//{col1, col2} = Words((lb << get items)[1], "=");

I just quickly threw together the script so use better naming than I did for variables, prevent selection of multiple values in col list boxes and remove hard-coded limits of column indexing. When you need the values you can get then with << get items to the list box reference, which will give you a list of items. Then use Words() to further split that into different parts.