こんにちは、みんな、
スクリプトに関して助けが必要です。 以下のような生データテーブルから要約テーブルを作成するスクリプトがあります。
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" );
******
次に、サブグループ列の名前を自動的に変更する必要があります。 日付は毎日変わります。
現在の形式 -- rcr%(:date_) から形式 -- :date_ に変更したい
結局のところ、日付の前に rcr% という単語を入れたくないのです。

ここでスクリプトを変更します。最初の変更は、集計テーブルに名前を付けることです。
Output Table( "My Summary" )
2 番目の変更では、新しいテーブルのすべての列をループし、名前が「rcr%」で始まる列をすべて変更し、名前を変更します。
// 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 ) )
)
);
完全なスクリプトは次のとおりです
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 ) )
)
);
また、ディスカッションに JSL を入力してください。
アイコンは、コミュニティ メンバーが問題を読んで理解しやすい形式で JSL を表示します。