Xpath enum flow variables - set column type via flow variables

Hi there,

Can someone help me how can I set the column properties (String, Integer and Collection) via flow variables. I know that the column type would be set with the flow variable ‘multitagOption()’, but what is the form of this, I have used 'List (Collection of: String), but this is not recognised and gives an Enum error. Can someone let me know how to set the column type via flow variables.

Thanks in advance for your help,

Rich H

Generally speaking, every Node Configuration Window has a tab “Flow Variables” where you can remote control all settings. The more commonly used ones even have a place in the normal config GUI. Neat feature.

Specifically for your problem, what node do you want to set column properties with?


I need to create a collection column, The workflow I have, reads an excel file which contains xpaths, return types, and the output column type. I pass these as flow variables into xpath node within a loop, this allows me to cycle through a large number of queries and produce an output table of the results. However, I need to be able to define in the excel workbook, what the output type should be, i.e. integer, String, collection column etc. In order to do this I need to know what are these values I should pass into the field ‘MultiTagOption()’.

So in the example worksheets below

ColumnName ReturnType MultiTagOption Xpath

Scientist String SingleCell //document//Synonym/@value
Synonym String List (Collection of: String) //document/ProjectCode/@value
ProjectCode Integer SingleCell //document/ProjectCode/@value
Description String SingleCell //document/PDescription/@value

So should the multitagoption values be as follows;

Single Cell
Collection Cell
Multiple Columns
Multiple Rows

and the Return Type should be;

String cell
Double cell
Node cell
Boolean cell
Integer cell

So the above example should then be;

ColumnName ReturnType MultiTagOption Xpath

Scientist String cell Single Cell //document//Synonym/@value
Synonym String cell Collection Cell //document/ProjectCode/@value
ProjectCode Integer cell Single Cell //document/ProjectCode/@value
Description String cell Single Cell //document/PDescription/@value

Thanks for the help,

Rich H

I just tried the workflow with the MultiTagOption and Return Type variables set as the values defined in the GUI, and the workflow failed due to enum constant error; ‘Errors loading flow variables into Node: Coding issue: No enum constant org.knime.xml.node.xpath2.XpathNodeSettings.XpathOutput.String cell’

So can you let me know the correct constants to use.


Rich H

Here is the related post around using loops to pass flow variables into xpath node;

Xpath and flow variables - set cell types via flow variable - KNIME Extensions - KNIME Community Forum

After a bit of experimenting, I have the following;

MultiTagOption flowvariables co:


SingleCell to create a single cell type
CollectionCell to create a collection cell type

Passed into the cells output type ‘String’.

Integer, Int and int all returned an enum error.

Can you share your current progress? It’s easier to help you with the remaining issues if I have your workflow and probably some of your Xmls if that’s possible as well.