KNIME - End If not executing after Empty Table Switch

Hi all,

I am having an issue with an End If node not running (clicking execute takes no action). The node follows an Empty Table Switch node and is the ‘end’ of my section of workflow if there is no data to be downloaded from SAP

Top path - download data from SAP
Empty Table - skip download and proceed to next Metanode.

As you can see in the screenshot below, I have added an End If after both my bottom path (empty table) and top path (loop).

Please can someone advise why the End If will not allow me to execute it?

Note - The node works perfectly if there is data in the table (i.e. top path is all green).

Thanks in advance.

Hi @taylorpeter55 , the issue is that you have an error with the Loop End inside the IF…End IF (you can see the X on the node state).

I can’t fully understand your design. It would seem like you are closing the loop (Loop End) only if your Empty Table Switch routes to the top, which is why it’s an issue. As you can see, you have started the loop (green state), which is outside the IF…End IF, but your Loop End is inside the IF…End IF.

“Note - The node works perfectly if there is data in the table (i.e. top path is all green).” That is why it works when there is data, the Loop End will get executed.

It’s not a good design the way it’s built. Can you give us a high level on what you are trying to achieve? What is the logic? We can may be help you if we understand what you are trying to do.

1 Like

@bruno29a Thanks for your reply (Again :slight_smile: )

I actually caught the issue with the End If loop about 10mins before your reply and it now works and the workflow continues to run in both situations.

When table is populated:

When table is not populated:

Thanks again for your replies and help - it is much appreciated.


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