Share
Explore

How to filter by selected row in another table in Coda

Last edited 33 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)

Client
Home Page
List Projects
1
Google
List Projects
2
Apple
List Projects
3
Microsoft
List Projects
There are no rows in this table

Blank
Projects

Name
Date
Notes
No results from filter

ORIGINAL DATA TABLES


Clients
1
Client
Home Page
Projects
List Projects
1
Google
new search engine
home page refresh
List Projects
2
Apple
iPad 2025
iPad 2026
iMac 2027
List Projects
3
Microsoft
new game platform
List Projects
There are no rows in this table

Projects
1
Name
Date
Notes
Client
1
iPad 2025
5/16/2024
Open
Apple
2
iPad 2026
5/21/2024
Open
Apple
3
iMac 2027
5/31/2024
Open
Apple
4
new search engine
5/17/2024
Open
Google
5
home page refresh
5/3/2024
Open
Google
6
new game platform
5/27/2024
Open
Microsoft
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.