Multiple Values in one Variable

Hello everyone,

I need to stored multiple values in one Knime variable.

I’m already using workflow variables but I am able to set for each wf variable only one value, anyone knows the way to set a list of multiple values in one variable and then using it in different nodes. In SAS this is possibile by using the &SET& and &PUT& methods.

Let me know and thanks in advance.

Alessandro

For Strings at least, you can store multiple values in a single variable, by concatenating them with a deliminator, as long as that deliminator does not occur in any of the values. This trick is used in the Load XXX Files series of nodes in the Vernalis plugin, which will accept a single flow variable containing multiple file paths.

Steve

1 Like

Hi Roughley, thanks for the answer. When you talked about “deliminator” did you mean values separated by a delimiter (such as a “,”)?

Vernalis plugins are for example “Flow Variable IF Switch”?

Thanks for the support

Alessandro

Yes, that’s exactly what I mean. The nodes I was referring to are eg. https://nodepit.com/node/com.vernalis.knime.io.nodes.load.txt.LoadTextFilesNodeFactory

Steve