Hi,
I'm trying to create multiple formula column by passing "column name" and "formula" as an argument to function from a nested for loop which iterate over a list of list which contains these two values.
Function:
add_col=Function({col_name,col_calc},Show(col_name,col_calc);
cal_2<<New Column(col_name,Numeric,Continuous,Format("Best",12),Formula(col_calc));
);
List:
cols={{"g IgG in Fr II+III Suspension",If(
:Name( "ISB Paste Source/Plasma Type" ) ==
:Name( "Fill Batch Paste Source/Plasma Type" ) ==
:Name( "SFB Paste Source/Plasma Type" ),
:Name( "Individual Fr 2+3 Paste Suspended (Kg) [Bk]" ) *
:Solution Weight After IM HOAc Addition,
Empty()
);},.....};
Loop:
For(i=1,i<=N Items(cols),i++,
For(k=1,k<N Items(cols[i]),k++,
cn=cols[i][k];cl=cols[i][k+1];
);show(cn,cl);
add_col(cn,cl);
);
Log Report:
cn = "g IgG in Fr II+III Suspension";
cl = If(:Name("ISB Paste Source/Plasma Type") == :Name("Fill Batch Paste Source/Plasma Type") == :Name("SFB Paste Source/Plasma Type"), :Name("Individual Fr 2+3 Paste Suspended (Kg) [Bk]") * :Solution Weight After IM HOAc Addition, Empty());
col_name = "g IgG in Fr II+III Suspension";
col_calc = .;
**Not exactly NULL but a DOT(.).
Message was edited by: Vivek Sharma