I need to add all of the rows from one table appended onto another table to automate the logging of metrics. The list in the first table may change year over year, so I just want to be able to search for all of its contents and add them to the log with the press of a button.
Please see an example of FormulaMap() doing what you are looking for here.
FormulaMap() has been renamed to the more understandable ForEach(). But the original name still works.
For anyone like me who was struggling with getting multiple rows from one table (Table 1) that contains multiple columns to copy to a second table (Table 2) with the same columns, note that you can create an AddRow() button on each row of Table 1, then use a Push Button outside the Table to trigger all AddRow() buttons for each row in Table 1 to add their contents to Table 2.
I spent a couple hours trying to write code that would overcome the limitation of ForEach() /FormulaMap() with AddRow(), because that combo seems to push the contents from ALL rows of a particular column in Table 1 into each cell within Table 2.
The ForEach() formula will not copy all rows when using AddRow(). If that happens, there is an error in the formula. Please look at the example I have shared above, or share your formula so that the community can have a look and see what is going wrong.
I was sharing with the community how I solved a problem to copy as many rows as there are records in one table and append those to another table, after having trouble using the ForEach() formula and trying a different method instead (using a Push Button to trigger all the Buttons that resided on rows within a particular Table to fire).
So I don’t have an issue for which I’m needing help. Thank you!