SWITCH function in column expressions

Hi,

I am trying to use SWITCH function in Column Expressions node, syntax is below. However it always gives me the default result which is “error”, although there is some matching codes in the dataset.

Does SWITCH works in KNIME? If so, what should be the correct syntax?

switch(column("Company Code")) {
    case '11':'Italy';
    case '12':'Poland';
  default: 'error'
}
1 Like

Hello @Piotr_S ,

the switch function exists and works in KNIME: have a look at the syntax at the linik here below.

Here is a simple example:
immagine
immagine

Have a nice day,
Raffaello

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.