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:
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:
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:
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?