I still have an additional question:
What I finally want to do is to create a new column for each item of a list. In Stig's solution the column formula still depends on the variable "a[]" and not (as I'd prefer) on the column name "Column 1", so I'm not allowed to change "a[]" in the following script without changing the calculated column values as well. That means my following approach does not work (the length of collist and the column names can change, so I need a loop):
collist = {"column 1", "column 2"};
for (k=1, k<=length(collist), k++,
a = Column(collist);
new column(concat("test",char(k)), formula( a[]*2 ));
);
Directly inserting a list element in the formula() statement does not work either. Does anyone have another suggestion?
Dahla