Guys,
Once again I ask for help, because I believe that because I am a beginner I am applying some wrong rule.
I learned here on the forum with the help when I needed to use the Column Expression node where it was useful at the time. Now I’m applying what I learned in a case but I’m not succeeding.
I need to change each line of the file by applying the following rule:
change the last line information from |12120| to |23110|
also change from |41100| to |23110|
each time it contains the following information in the line:
“|C191|” or “|C195|” and “|98|2202|” or “|98|1202|” and the last field like |12120| or |41100|
If there is another method with another node to apply this rule, I’m ready to learn as well.
Here’s a small table model and the code I’m trying to apply. My code is applying to every file even on lines that shouldn’t be changed.
Thank you for everyone who can help me achieve the result.
if(or(and(contains(column(“Col0”),"|C191|","|C195|")),("|98|1202|","|98|2202|")) == true)
{
replace(column(“Col0”),"|12120|","|23110|");
replace(column(“Col0”), “|41100|”, “|23110|”)
}
Replace.knwf (10.7 KB)