Ooops! Sorry - It looks like you actually want to sum across columns row-wise. See, for example.
Alternatively, if you do want a formula:
NamesDefaultToHere(1);
// How many columns in the table?
nc = RandomInteger(2, 20);
// Build the table with some random data
dt = NewTable("Sum Columns", << addMultipleColumns("Col ", nc, Numeric));
for(c=1, c<=nc, c++, Column(dt, c) << setFormula(RandomNormal()));
dt << addRows(10);
dt << runFormulas;
// Start here with the current data table
dt2 = CurrentDataTable();
cols2 = dt2 << getColumnNames("Numeric");
// Add the row-wise sum as a new formula column
afc = Expr(dt2 << newColumn("Sum over Columns", Numeric, Continuous, Formula(Sum(colsTBD))));
SubstituteInto(afc, Expr(colsTBD), Eval(cols2));
afc;
(This posting was originally incomplete).