Skip to content
Linked Columns
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 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.
One issue with this idea is that automations aren’t instantaneous, so you’ll have to wait a bit for the update to be reflected.
Handle the edge case where the local column is blank
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.
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

RunActions(
thisRow.ModifyRows(thisRow.SourceColumn,
If(thisRow.SourceColumn.IsBlank(), '',
thisRow.SourceColumn.Filter(Dest.Contains(CurrentValue))
)
),
Target.Filter(TargetColumn.Contains(thisRow)).IfBlank(List()).ListCombine(
thisRow.SourceColumn.IfBlank(List())).Unique().FormulaMap(
WithName(CurrentValue, Row,
Row.ModifyRows(TargetColumn,
thisTable.Filter(SourceColumn.Contains(Row))
)
)
)
)
Use to easily add this to your doc.

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

Target
0
Name
TargetColumn
Button | Update
1
X
A
B
C
Update
2
Y
A
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.