Hi,
I want to create a new column in the 2nd JMP table with a formula that simply sums the Columns contain in the list (in the code I've assigned column name to binss.
For Ex: The list contains Column names "39","41","43". I want to create a new Column in the Soft Bin Summary table with addition of all these in the formula
I can't figure out what I'm doing wrong in going from the list {""} of columns to the reference to the columns.
Any help is much appreciated.
Here's the code that I've tried
Names Default To Here( 1 );
Clear Globals();
dt = Data Table( "Untitled 910" );
dt2 = Data Table( "Soft Bin Summary" );
Try( For Each Row( :Yield SummaryBins = Word( 1, :Yield SummaryBins, "[]" ) ) );
grouplist = dt:Yield SummaryBins << get values;
For( i = N Items( grouplist ), i >= 1, i--,
If( grouplist[i] == "",
Remove From( grouplist, i, 1 ),
));
binss = {}; /// list contaiting bin value
For( i = 1, i <= N Items( grouplist ), i++,
If( Contains( grouplist[i], " " ),
Insert Into( binss, grouplist[i] )
)
);
adad = Words( binss[1], " " );
F = Eval Expr( Sum( Expr( adad ) ) );
/// Something doesn't seem to right in the below loop
For( i = 1, i <= N Items( binss ), i++,
dt2 << New Column( binss[i], "Numeric", "Continuous", Format( "Percent", 12, 2 ), Formula( Name Expr( F ) ) ););
Thanks,
Jack