Hi, I’m very new to Coda and not yet sure how button formulas work (or most formulas for that matter ). Any help would be much appreciated
I want three buttons sitting above the table in the doc to do the following:
Press Button 1
the values in column B are updated to equal the values in column A. For example if I press Button 1, column B would update to show the value 5 where the value of column A was also 5
however, because Button 1 performs the action and thus column B does not have a formula itself, I could subsequently update the values in column B manually if I want to. For example I could change the value in column B from 5 to 7
Press Button 2
the values in column C are updated to equal their current value + the current value of column B. For example the value in row 1, column C would be equal to 120 + 7 i.e. 127
Press Button 3
clears all values from column B
note: could this Button be automated such that it is pressed automatically once the action from manually pressing Button 2 has been completed?
Does anyone have an example of a table and buttons they’ve created like this I can learn from?
The row to modify here is represented by CurrentValue
A table is in fact a list of rows and each row in the list of all rows is stored within CurrentValue. Each very specific value in your column C (for example) is stored as CurrentValue.C which Coda would display as just C in a formula)
The column to modify is the column B ( CurrentValue.B)
In other words, each specific value in the column B
The new column value is CurrentValue.A
I.e.: Each specific value in the “list of all rows” in the column A
That is the beauty of Coda, many different ways to do things, so you are always learning.
In a subtle way, @Pch and I solved slightly different problems. One solution is to be able to execute specific single rows, the other to do the calculation for the entire table in a single button press.
Elsewhere i have seen a solution using FormulaMap() that will update rows based on a certain characteristic in another row. I am certain that demo was also done by PcH.