Warning: Beginner level question
I have a data table to which I am adding a temporary column (:Parameter_new) to fill up with entries if a certain condition is met. The entries I then want to get into another column (:Parameter_old). My impression is that the code behaves differently when it is part of the final script, compared to when I copy individual lines into a different script. When applying the script code line by line, everything works as expected. When implemented into the final script I only get blank values. Where am I going wrong?
//Code works OK
dt << New Column ("Parameter_new", character);
dt << go to( :Parameter_new ) << move selected columns( After( :Parameter_old ));
For Each Row(
If(:Parameter_old == "Parameter x",
:Parameter_new = :Parameter_old || " " || "by" || " " ||:Method_description));
dt << select where(:Parameter_old == "Parameter x");
//Code does not work and deletes all entries in column "Parameter_old", i.e. cells come out blank
//Code does however work if applied individually, line by line
:Name("Parameter_old")[dt << get selected rows] = :Parameter_new;