Hi there,
I'm writing a script in jsl to search through column headers, find those beginning with the number 9, and then produce a summary table from a large data set that is grouped by those columns. Currently, my code is working for the first column, but seems to stop after that. Any help would be appreciated!
dt = Current Data Table();
N = N Col( dt );
For( i = 1, i <= N, i++,
colname = Column( i ) << getname();
If( Starts With( :Column( i ) << getname(), "9" ),
Data Table( "Func Counter pull" ) << Summary(
Group( :Column( i ) << getname() ),
N,
Subgroup( :INTERFACE_BIN_119325 ),
Freq( "None" ),
Weight( "None" )
)
)
;
);
It works through the iterations when doing like the following, but doesn't actually summarise by the group:
dt = Current Data Table();
N = N Col( dt );
emp_array = {};
For( i = 1, i <= N, i++,
colname = Column( i ) << getname();
If( Starts With( :Column( i ) << getname(), "9" ),
Insert Into( emp_array, :Column( i ) << getname() )
);
);
For( m = 1, m <= N Items( emp_array ), m++,
a = emp_array[m];
Data Table( "Func Counter pull" ) << Summary(
Group( :Name( "a" ) ),
N,
Subgroup( :INTERFACE_BIN_119325 ),
Freq( "None" ),
Weight( "None" )
);
);
If someone could point out how either is going wrong , that would be much appreciated!