Necesito actualizar diariamente esta tabla (como a continuación)

Actualizaré las nuevas ID de producto y receta_A y receta_B todos los días.
Entonces necesito ordenar receta_A y receta_B a otros dos columnas (sort_A & sort_B).
entonces yo copio recipe_A & recipe_B para sort_A & sort_B, y ejecuta este script (como se muestra a continuación)
De esta manera, puedo recodificar sort_A & sort_B.
Current Data Table() << Begin Data Update;
For Each Row( :sort_A = Match( :sort_A, "ZXC", "worse", "QWE", "better", "ASD", "good", :sort_A ) );
Current Data Table() << End Data Update;
Current Data Table() << Begin Data Update;
For Each Row( :sort_B = Match( :sort_B, "R123", "rrr", "H123", "hhh", "G123", "ggg", :sort_B ) );
Current Data Table() << End Data Update;
Mi pregunta es :
¿Cómo crear un script para copiar automáticamente la receta_A y la receta_B para ordenar_A y ordenar_B?
(Copia automática si faltan datos de sort_A & sort_B)?
A continuación se muestra una revisión de su código para verificar si existe una columna sort_A o sort_B, y si no es así, créela y llénela. Si existe, entonces repobla. Dado que los resultados de sort_A y sort_B se basan en los valores de recipe_A y recipe_B, no es necesario copiar los valores en sort_A y sort_B, y luego cambiar los valores en cada uno. Es mucho más fácil usar los valores de recipe_A y recipe_B para establecer los valores en sort_A y sort_B.
Names Default To Here( 1 );
dt = Current Data Table();
// Get a list of the current columns in the data table
ColList = dt << get column names( string );
// See if a column named "sort_A" does not exist
If( N Rows( Loc( ColList, "sort_A" ) ) == 0,
// If it does not exist, create the new column and use a formula to populate the values based upon the recipe_A values
dt << New Column( "sort_A", character, formula( Match( :recipe_A, "ZXC", "worse", "QWE", "better", "ASD", "good", :recipe_A ) ) );
// Remove the formula which will leave the results
dt:sort_A << delete formula;
,
// If the column already exists, then loop through the data table creating new values for sort_A based upon the recipe_A values
For Each Row( :sort_A = Match( :recipe_A, "ZXC", "worse", "QWE", "better", "ASD", "good", :recipe_A ) )
);
// See if a column named "sort_B" does not exist
If( N Rows( Loc( ColList, "sort_B" ) ) == 0,
// If it does not exist, create the new column and use a formula to populate the values based upon the recipe_B values
dt << New Column( "sort_B", character, formula( Match( :recipe_B, "R123", "rrr", "H123", "hhh", "G123", "ggg", :recipe_B ) ) );
dt:sort_B << delete formula;
,
// If the column already exists, then loop through the data table creating new values for sort_B based upon the recipe_B values
For Each Row( :sort_B = Match( :recipe_B, "R123", "rrr", "H123", "hhh", "G123", "ggg", :recipe_B ) )
);