Automatic Scheduling of Todos

Hi @Austin_White,

The FormulaMap function is confusing if you already have a conceptualization of programming. Accessing the different contexts such as thisRow and CurrentValue are not consistent. The Coda developers have a very difficult problem of handling data types across a system that doesn’t have strict-typing (appropriately so). Therefore, questions such as “what contexts does this function have access to” and “how do I explicitly access certain variables” are not always clear.

My best advice is to simply try typing the name of the variable you think you should have access to, and see what the formula building brings up! Use the colour-coding to understand which context the variable is from.

See the following clip to understand how the colours match up:
S007%20-%20Showing%20Formula%20Map%20(Reduced)%20(4)

In fact, you have the variable name “Type” in all three of the available contexts in the formula: Schedule, Tasks, and Configurations. For this reason, the formula builder is showing three different "Type"s. This is normally a sign that perhaps you have duplicate information that could be trimmed down:
31

For this reason, I end up muttering things like “Into purple, from green” over and over as I write my formulas. This helps to remind myself that (unlike in traditional programming), the color of the variables matters, and is helpful to understand.

Here is a screenshot of your formula the (hopefully) correct results:

And your complete formula:
Configurations.FormulaMap(AddRow(Tasks,Title,Title,Type,Type,Program,Program,Task,Task,Due,[Start Date]+Days))

PS - You were using AddOrModifyRows() before, and I changed it to an AddRows(). Is there a reason you wanted to use the potential “modify” part?

Lloyd

2 Likes