Help with a slow formula

I have a button formula that finds a given row in another table and modifies it. I then use push buttons to click this for a whole table of about 300 rows. It is ungodly slow, I assume a formula map is a better approach here but I have failed my many attempts to get that right. Any guidance or suggestions would be appreciated:

ModifyRows([Historical Data].Filter(Name.[ADP Name].Contains(thisRow.Name) and Date = thisRow.Date), [Historical Data].[ADP Hours], thisRow.[Final Hours])

image

Hey, @Vince_Balsamo
Take a look a at this article bellow from Optimizing slow formulas in your doc | Coda Help Center

Dereferences inside a Filter():

One of the most common patterns we see in slow formulas is the use of a dereference inside a Filter() formula. For example the formula below is dereferencing the value of the Name attribute of a row reference stored in Column 3 of Table 1 inside of a Filter() formula.

To fix this formula, remove the dereference from inside the Filter() query. Create a new column in the source table that is being filtered, in this case Table 1. The formula for that column should be same as the one inside the Filter() formula. In this case Column 4 stores the value of the Name field of the row reference stored in Column 3.

Once you’ve created a new column in the table that is being filtered that stores the result of the dereference, you can change the original Filter() query to just use this new column instead. In this example, you can replace the original Column 3.Name with the new Column 4 since it has the same formula.

3 Likes

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