Share
Explore

Linked Columns In Coda

Loading…

This is the simplest way to implement linked columns in Coda. It’s also slow if you have lots of rows because it has to do two types of heavy lookups. If there’s interest, a faster version could probably be found, but given that it only triggers with each row change and then waits for an automation to complete, I think this is usable.

Ideally, you don’t have to hit the “Update” button, since that is set up to be triggered by an automation.

Get all the destination rows that will need to be modified. This is a combination of all destination rows referenced in this row, plus all the times this row was referenced in the destination.
Avoid a Coda bug with ListCombine
Filter down to only single instances of each row
Modify each row in the destination table such that it contains all the places where this table mentions that row

Dest.Filter(DestLooksUpSource.Contains(thisRow))
.IfBlank(List())
.ListCombine(thisRow.SourceLooksUpDest
.IfBlank(List())
)
.Unique()
.
FormulaMap(WithName(CurrentValue, Row,
Row.ModifyRows(DestLooksUpSource, thisTable.Filter(SourceLooksUpDest.Contains(Row)))
))

Source
0
Name
SourceLooksUpDest
Button | Update
1
A
X
Update
2
B
X
Y
Z
Update
3
C
X
Update
There are no rows in this table

Dest
0
Name
DestLooksUpSource
Button | Update
1
X
A
B
C
Update
2
Y
B
Update
3
Z
B
Update
There are no rows in this table



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