I want to update a data table with new columns from a second data table. Interactively it correctly matches the values to the corresponding rows. But in the script it does not. I used expressions, but it seems it has an issue not displayed in the log, as it just adds the helper table to the original data table and does no match.Any ideas why this does not work?
Names Default to here(1);
dt = Open("./OrigTable.jmp");
idgroup = {"A", "B", "C", "D", "E", "F", "G"};
ymeanCleared = {[1.192, 1.349, ., 0.994, 1.101, 0.985, .],[1.054, .,
1.174, ., 1.297, 0.80365, .]};
// Column Dialog to select Parameter "HC-E T/g" and "PN-E T/g"
dlg = Column Dialog(
yCol = Col List( "Y, Data", Data Type( Numeric ), Min Col( 1 ) ),
Line Up( 2, "Significance", a = Edit Number( 0.05 ) ),
"Select data for outlier test"
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
Remove From( dlg );
Eval List( dlg );
for (l=1,l<=N Items (yCol), l++,
paramName = Word (1,Char( Name Expr( ycol[l] ) ),"- ");
ColNameFZ = "Fahrzeug-ID " || paramName;
ColNameM = "Prueffeld Mean " || paramName;
ColNameS = "Prueffeld Stdv " || paramName;
dt_help = New Table( "Help_"||char(num(l)),
Add Rows( N Items(idgroup) ),
New Column( ColNameFZ, Character, Nominal, <<Set Values( idgroup ) ),
New Column( ColNameM, Continuous, Format( "Fixed", 12, 4 ), <<Set Values( ymeanCleared[l] ) ),
);
/*str = Expr(
dt << Update(
With( dt_help,Match Columns( Column( "Fahrzeug-ID" ) = Column(__X__) ))
)
);*/
Eval(Substitute(
Expr(
dt << Update(With( dt_help,Match Columns( Column( "Fahrzeug-ID" ) = Column(__X__) )))
),
Expr(__X__),ColNameFZ[1]))
)
Some screenshots to help with what I tried:



now interactive update

