Better alternative to CASE SWITCH (with 15 options)?

Hi @kowisoft

Sorry I’m replying late to your posts and questions about the JSON implementation since it is only now I have access to a computer with KNIME.

The good news is that you got the idea and managed to implement it eventually :wink: !

I had a look at your solution and it could be implemented in a simpler way just by using the -Call Local Workflow (Table Based)- and the -Container Input (Table)- nodes. I do not think one needs the JSON versions in your case although it is a very good example illustrating how to use them too.

Using the -Call Local Workflow (Table Based)- and the -Container Input (Table)- nodes, you would not need to go through JSON settings and conversions as in the solution showed here below :

The subworkflow would be also modified from:

to a simpler solution too :

I’m posting here for reference the modified main workflow with the two alternative sub-workflows too:

20220508 KOWISOFT main workflow.knar (205.3 KB)

This illustrates how a generic CASE-SWITCH scheme controlled by a variable could be implemented with as many switch options as sub-workflows needed for that.

Again, @kowisoft you posted here a very nice challenge :wink: !

Hope it helps,

Ael

5 Likes