Hola a todos,
Necesito ayuda con mi guión. Tengo un script que crea una tabla resumen a partir de la tabla de datos sin procesar como se muestra a continuación;
Data Table( "DVIRCR_SumTable" ) << Summary(
Group( :prodgroup3, :subapp ),
Max( :rcr% ),
Subgroup( :date_ ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" ),
Link to original data table( 0 )
);
//rename N Rows column to Lot Count
:Name( "N Rows" ) << Set Name( "Lot Count" );
******
Ahora necesito cambiar el nombre de la columna del subgrupo automáticamente. La fecha cambiará todos los días.
Quiero cambiar del formato actual -- rcr%(:date_) al formato -- :date_
En última instancia, no quiero ninguna palabra rcr% delante de la fecha.

Aquí hay una modificación de su script.La primera modificación es darle un nombre a la tabla resumen.
Output Table( "My Summary" )
La segunda modificación recorre todas las columnas de la nueva tabla y cambia cualquier columna cuyo nombre comience con "rcr%" y cambia el nombre.
// Create a list of all of the column
colNames = Data Table( "My Summary" ) << get column names( string );
// Loop through all of the names, and when "rcr%," is found in the
// start of the column name, change the name to the column name
// starting from the 7th character in the name
For Each( {col}, colNames,
If( Contains( col, "rcr%," ) == 1,
Column( col ) << set name( Substr( col, 7 ) )
)
);
Aquí está el guión completo.
Names Default to Here( 1 );
Data Table( "DVIRCR_SumTable" ) << Summary(
Group( :prodgroup3, :subapp ),
Max( :rcr% ),
Subgroup( :date_ ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" ),
Link to original data table( 0 ),
Output Table( "My Summary" )
);
//rename N Rows column to Lot Count
:Name( "N Rows" ) << Set Name( "Lot Count" );
// Create a list of all of the column
colNames = Data Table( "My Summary" ) << get column names( string );
// Loop through all of the names, and when "rcr%," is found in the
// start of the column name, change the name to the column name
// starting from the 7th character in the name
For Each( {col}, colNames,
If( Contains( col, "rcr%," ) == 1,
Column( col ) << set name( Substr( col, 7 ) )
)
);
Además, ingrese su JSL en las discusiones utilizando el
ícono que muestra el JSL en un formato más fácil para que los miembros de la comunidad lean y comprendan el problema.