Summing all columns using loopHi all, building a fairly lengthy script where I won't know what columns are present in a given table as it's creating multiple tables from different data sets. A summary table is created with upwards of 50 columns, sometimes more than 70. I need to sum all the values in these columns, but can't specify the sum by :Name("Column Name") in case some of the categories are present/missing. This is the loop I am trying to use:
Current Data Table() << New Column( "Total Die",
formula(
For( j = 1, j <= N, j++,
cols = Column( dt, j ) << getname();
);
Sum(cols)
)
);
The sum won't accept the format of the list , so just wondering how else to do this? Thanks!
Scripting