Insert New Column With loop

I have this flow:

This flow first filters some dates and converts them into variables, to filter those dates in another file

File 1 contains the following:

KEY ACCOUNT COLUMN1 COLUMN2 COLUMN3
1919 XXXXXXX 01062024 02062024 03062024

And file two has the following structure
KEY VALUE DATE
1919 10000 01062024
1919 20000 02062024

And what I want is for me to cross the keys and insert a column with the name of the variable, which in this case are the dates that are in file 1

KEY ACCOUNT COLUMN1 COLUMN2 COLUMN3 01062024 02062024
1919 XXXXX 01062024 02062024 03062024 10000 20000

In the end my Loop end tells me that it cannot be done, because the structure of the table changed

Is there any way to do this? To insert new columns using variables and as the join between the two files is performed, a new column is created for each date that is in my variable

2 Likes

It doesn’t work, because it repeats the table several times and also every time it goes through the Join the data in the table moves,

I have always handled column filters within the loop to mange those issues. You can use Regex to select and filter columns as well. Here is another recent request to handle those things within the loop nodes.

Hi @Aprins,

if you can share your workflow, you might also send it via email, I can have a look and fix the cause.

Best
Mike