Sundry tips - Responses to Community Questions

icon picker
Differences between rows

Calculating the differences between rows in Coda can be tricky, for the following reasons:
The row sequence is not static, like it is in Excel. For a full discussion of row sequence,
Formulas are valid for all rows in a column. Which means that if your formula is “difference = this row - previous row”, you are going to need additional logic to handle the case of the first row in your table.
Individual “cells” in Coda cannot be used in formulas like in Excel. The smallest unit to directly work with in Coda is a row.

To be able to work through a table sequentially, it is therefor first necessary to establish the row sequence that you need. The example below comes from
The simplest way is to rank() the table in the sequence that you need. In the example below, I have ranked() table TabPeople in ascending sequence of the entries in column colSurname.
Tip Working through a table in the sequence in which the rows were created, is possible using the property RowID. However, this property has a major drawback: if rows are deleted, the list of RowID’s will have gaps. Simply create a column where you rank() based on the RowID, and use the new column to scroll up and down through the table rows.
Getting a sorted source list : Table tabPeople, column Rank by Surname
In the example on , the requirement was to link a task to the next person in the list (alphabetically) every month. In that the table containing the tasks, add two columns. One for a button to do the cycling, and another as a variable to store where in the sequence this particular task is. It is fairly simple, add 1 to the existing value in the variable Sequence Status, and if you’ve reach the largest number, start over with 1.
Cycling through the source list:
And then it is simple to use that Sequence number to go to tabPeople, find the relevant record, and extract the needed cell - In this case the surname.
Displaying the Responsible Person’s surname:

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.