Add support for nested formulamap

I’m trying to add values to a table based on a set of tables when a button is clicked. I try to do something like

TableA.FormulaMap(TableB.FormulaMap(TableC.FormulaMap(addRow(TableOut, col1, col1A, col2, col2B, col3, col3C)))

The above doesn’t work for me. What I expected from that row was for every row in TableA joined with every row in TableB joined with every row in TableC create a new row in TableOut. For some reason I don’t get that instead, I get the full list of values for some of the columns.

In an ideal world I would like to see something like the following supported:

Table1.FormulaMap(tab1Row -> Table2.FormulaMap(tab2Row -> doStuff(tab1Row, tab2Row)))

The problem is illustrated here: https://coda.io/d/Untitled_d4IPZXhNeke/FormulaError_suZJN#_lu9r- by clicking the generate button.

4 Likes

I agree this would be a very valuable feature!

@Tomas_Jansson, in the meantime I have been doing the following:

1 Like

Yeah, nice approach. I did implement another workaround using some tables. What I would like to see though is the support of closures and lambdas so you can write something like:

Table1.FormulaMap(tab1Row -> Table2.FormulaMap(tab2Row -> doStuff(tab1Row, tab2Row)))
2 Likes