Quick question regarding using flow variables as column names. I am trying to use the “Column List Loop Start” to do string manipulations across multiple columns. When I add the variable “$${ScurrentColumnName}$$” to the expression it is using the actual underlying column name string in the expression rather then the column (i.e. “$column1$” or “$column2$”). So as an example I am trying to get the MAX LENGTH of each column, but it is reading only the MAX length of the column name and not the actual column contents. Can anyone help with the appropriate way to use $${ScurrentColumnName}$$ as an expression?
As @izaychik63 mentioned you can pick the “Column Expressions” node in which you use the current column like this: column(variable("currentColumnName"))
E.g. length(column(variable("currentColumnName")))
Or you can create your expression in a “String Manipulation (Variable)” node as a new variable:
E.g. join("length($", $${ScurrentColumnName}$$, "$)")
And then use this expression in “String Manipulation” node by assigning the variable to the “expression” option in “Flow Variables” tab: