One way of doing this is to concatenate your columns using String Manipulation to get you the LIFNR ‘100nnnnn’ part which is common to all rows, then use Column Expression to “decorate” the rows with the bits which are specific to the first row, last row and other rows, based on the following logic:
Row 1: “(” + commonoutput + " OR"
Middle Rows commonoutput + " OR"
Last Row: commonoutput + “)”
See attached workflow.
KNIME_connecting_per_row.knwf (11.4 KB)
You could of course do the entire concatenation in Column Expressions and get rid of the String Manipulation altogether. It’s personal preference but I prefer to keep the “common” processing and the dynamic processing separated, and it also serves as a demo of different nodes. However, if you had a huge data set and performance were an issue, then bringing them into the one single node would probably be more efficient.
(edit - this is a related side message to @TotalDataLoss - this is my “future self” who, as I predicted, hasn’t wasted any time today because of the rowIndex bug you pointed out 6 days ago!
RowIndex calculated wrongly? - #9 by takbb)