How to break iteration in a loop if a node results in an empty table

Hi,

I have to process certain data from Excel and made a loop to go through all the files in a folder and consolidate the results. Problem is, there could be a situation when processing a file could result in an empty table, and therefore will stop the workflow.

I have read some of the entries in the forum about this but since I’m new to KNIME I had a hard time grasping the solutions.

Here is my workflow:

I would like to break the current iteration and move to the next file if the result is an empty table, and move on the next node if it is not an empty table. I hope you could help me on this. Thank you!

Hi!

There is a Empty Table Switch node that can help :wink:

Br,
Ivan

2 Likes

Hi Ivan,

Thank you for the response.

I tried doing it as you can see below. I’m not sure if I’m doing it right since it throws the error:
“ERROR Loop End 0:52 Active Scope End node in inactive branch not allowed.”

Thank you

Hi @airahdelafuente,
You can not have two loop ends in the same loop.
Instead put the End IF node after the Math Formula (Node 37) node and connect empty table branch of your Switch directly to it, the other branch connect to the String to Number (Node 36).

best,
Gabriel

3 Likes

Yaaay! Thank you, it worked :laughing:

2 Likes

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