Patching filtered data stepwise into combined table

Hello,
I would like to do some comparison work of quite similiar kind of data. First of all I added the following simplified workflow for explanation:

At the beginning the workflow reads out all files within a specific path with a certain file extension. The shown loop ensures that all files run through the following process. In each “untreated” file there’s a cellcontent which allows you to differ into 2 sources of data. Because of some structure differences, the folllowing treatment (filtering the required data) is different too. The output of each branch (Node 4/5) is a table with the same number of rows and columns. Some columnheaders are the same for both treatments (e. g. “time” and “date”).

Till this Point everything works well - Now my aim is to combine these treated tables like this:

I tried a few things but it still don’t work. The problem is that the IF-Switch always inactivates one of the both branches - so the “Loop End Node” is also inactive. When I used single “Loop Ends” it worked fine: All tables of one type (A,B) where concatenated, but it’s not possible to use one for each of the branches.

I tried to use a “End if Note” for activating the inactivated branch and fill in empty tables with same column Header. I thought of removing the empty files afterwards:

(“MW_Sort” stands for the treatment-part.)
Well, it does work, but - like you see on the lower “end if” turned yellow - you always have to execute the “endif” in each step.

I just made Knime experience a few days - so someone got an idea? i would appreciate :wink:

Hi @schm90 -

Would it be possible to post your archived workflow with some dummy data (in .knwf format)? You’ve provided quite lot of useful information - thanks! - but for looping operations it’s often easiest to debug things as they run.

One quick suggestion: in the config dialog for Loop End (2 ports), are the options checked for “Ignore empty tables at port X”?