You just need to go through the numeric columns and put into a list, the ones with Spec Limits. Then use the Group Columns message to create the group
Names Default To Here( 1 );
dt = Current Data Table();
theNames = dt << get column names( numeric, string );
specLimitsList = {};
For Each( {colName}, theNames,
If( Is Empty( Column( colName ) << get property( "Spec Limits" ) ) == 0,
Insert Into( specLimitsList, colName )
)
);
dt << group columns( "HaveSpecLimits", specLimitsList );
Jim