Delete/Overwrite rows based on date range


I’m trying to find a way that allows me to dynamically overwrite rows of a table based on execution date.

I have a large table A with content up to the current Date -1 day.
When I execute the workflow, I create a Table B containing data of the previous 7 days and the current day.

I would now like to delete all the entries in A falling into that date range of B and append the new data of B to that filtered table.

How do I do this?

I tried working with Date&Time based row Filter but that one works the opposite way.

Hi @peppapiglet
I’m not sure this will work for you, but I will solve the same problem using “Concatenate”. Take a look at the workflow is attached, maybe it will help you. :thinking:
overwrite rows.knwf (17.8 KB)

1 Like

Hi @ FtmhRahimi,

thanks a lot for your help. The concept works and is basically what I want to do with my workflow.
However, you’re filtering based on Row_IDs here and I’m afraid I cannot transfer this to my workflow.

Is there a way to ignore Row IDs and use the date column instead to detect duplicates?

I think u can use the “Duplicate Row Filter” after “Concatenate” and use the date column to detect duplicates.

1 Like

Sorry, I just realized that my idea of using the date column won’t work because it will simply filter out everything that has the same date and just leave me with 1 entry per day.

I do not really have a unique identifier that I could use for first/last, that’s kind of a problem I guess.

Is there a way to just delete everything from a table that falls within a certain timeframe ? the next step would be to simply append the new table.

Like an inverted Date & Time Row Filter

You can delete everything from a table that falls within a certain time frame using “Rule-Based Row Filter”. I did this in the following workflow.
overwrite rows2.knwf (18.6 KB)


TY very much. This will do the job

1 Like

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