I think this does what you are looking for. I used Eval(Substitute()) because it is usually a bit easier to read what it is doing directly from the code. I also separated evaluation from the expression building, so you can print it if you wish to see what it looks like. For Each loops can also be debugged by setting current row to specific value as long as you have correct table as current data table.
Names Default To Here(1);
dt1 = Open("$DOWNLOADS/DATAtable1.jmp");
dt2 = Open("$DOWNLOADS/DATAtable2.jmp");
//Row() = 2;
For Each Row(
dt2,
process_value = :Process;
first_offset = :first_OFFSET;
second_offset = :second_OFFSET;
third_offset = :third_OFFSET;
If(
(Char(first_offset) != "." & Char(first_offset) != "") | (Char(second_offset) != "." &
Char(second_offset) != "") | (Char(third_offset) != "." & Char(third_offset) != ""),
new_column_name = process_value || "_offset";
col_expr = Substitute(
Expr(dt1 << New Column(new_column_name, Numeric, Continuous, Formula(
If(:Supplier == "FIRST",
_processval_ + _firstoffset_
, :Supplier == "SECOND",
_processval_ + _secondtoffset_
, :Supplier == "THIRD",
_processval_ + _thirdoffset_
, // else
_processval_
)
))),
Expr(_processval_), Name Expr(AsColumn(dt1, process_value)),
Expr(_firstoffset_), first_offset,
Expr(_secondtoffset_), second_offset,
Expr(_thirdoffset_), third_offset
);
//show(col_expr);
new_col = Eval(col_expr);
);
);
-Jarmo