Consecutively fill empty cells in a column with values from another table?

Have clicked through the entire node tree to see, if the below can done, but didn’t come up with anything too useful.

I would like to consecutively fill empty cells (and only empty cells) in a column with values from a column in another data table. E.g., a column in the first data table would look like this (empty cells indicated by a dot):

Table(1)Col(x)
Control1
.
.
.
Control2
Control3
.
.
.
Control4

Now I have a second table with a column of continuous data, like that:

Table(2)Col(y)
Value1
Value2
Value3
Value4
Value5

And I want to fill the empty cells in Table(1)Col(x) with the values from Table(2)Col(y), so that the resulting column(x) in table(1) would look like this:

Table(1)Col(x)
Control1
Value1
Value2
Value3
Control2
Control3
Value4
Value5
.
Control4

Ideally, if there are more empty cells in col(x) than values in col(y), the filling-in would just stop when all the values in col(y) are used up. Conversely, if there are more values in col(y) than there are empty cells in Col(x), the filling-in should stop when all empty cells in col(x) are used up.

Is there a way to do this? Thx!

You could use a Joiner node to add Col(y) to Table(1), and then apply the Column Merger node to Col(x) and Col(y), choosing Col(x) as the primary column and Col(y) as the secondary.

1 Like

Hi there @pipetman,

so you can do following:

  1. Filter your table 1 to only contain empty cells
  2. Use Column Appender to match empty cells to your values
  3. Use Cell Replacer to add Values based on RowID
  4. Apply column Merger

Manipulation

Br,
Ivan

2 Likes

I started fuzzing around with stripping out the non-empty rows, then joining the columns and then putting the non-empty rows back in the right place based on some keys present in a couple of other columns. But that was a lot more unwieldy than the approach with the RowIDs, which looks a lot more straightforward.
Thanks!

The above mentioned join/merge wouldn’t work, I think, as it would not consecutively fill the empty rows.

1 Like

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