Share
Explore

How to filter by selected row in another table in Coda

Last edited 404 days ago by Eric Shank.

PROBLEM

Suppose you want to filter a view of a table according to which row is currently selected in a view of another table
You might think you could do something like:
view of projects.filter(thisrow.client = view of clients.selectedrow)
Alas, as of May 2024 it seems Coda does not support anything like “selectedrow”
Below is a workaround:

METHOD

Summary: Use a button to set the value of a selector to the current row in the main table, then filter the detail table by the selector and hilight the row in the main table that matches the selector.
Set up the structure
Master table , Detail table
Add a select control to the canvas
Create button column that when pressed sets the control value of the selector to the current row, with alert shown only for errors
Create the user interface
create view of the master table
conditionally format the master table to hilight the row that matches the select control
create view of the detail table
filter the detail table by the select control
hide columns, etc. in your views
optionally, you can hide the selector elsewhere

USER INTERFACE (USING TABLE VIEWS)

Google
List Projects
Apple
List Projects
Microsoft
List Projects
There are no rows in this table

Projects

No results from filter

ORIGINAL DATA TABLES


Clients
Google
List Projects
Apple
List Projects
Microsoft
List Projects
There are no rows in this table

Projects
iPad 2025
5/16/2024
iPad 2026
5/21/2024
iMac 2027
5/31/2024
new search engine
5/17/2024
home page refresh
5/3/2024
new game platform
5/27/2024
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.