Quick "View" Function?

#1

Hello,

This may be obvious to some of you, but I can’t work my head around how to do something like this. I’m trying to use a button (or something) to create a quick “view” of my table. Here’s an example of what I mean.

My example table contains the following column headers: person, city. Here’s some sample data:

Bill | New York
Rob | Chicago
Bill | Chicago
Jon | San Francisco

I want to have 3 buttons (or links, etc.): New York, Chicago, San Francisco. When you press the “New York” button it only shows the first row. When you press the “Chicago” button, it only shows rows 2 and 3, etc.

Does that function exist? I saw something similar in a todo sample page but it was a slider and needed a numerical value and aggregated (e.g. 1, 1-2, 1-3, etc.), but I was hoping to not have to number each city, and also need to “filter out” the ones that don’t match exactly.

Thanks!!

#2

Hi @Benn_Bennett - have your looked at the select or the multiselect control? I can help you more with setup and how to use it if that works for you - https://coda.io/learn/essentials/Controls

#3

That was a perfect solution! Thanks! I had a bit of trouble because my column was set to lookup from another table, but when I reformatted it to "select from list’ that did the trick. Is there a way to turn off the filter, or “show all”?

#4

To turn off filters I use a checkbox control beside the select one.
In the filter of your table add the formula : if(checkbox, yourcolum.matches(selectbox), thistable)
Very useful!

1 Like
#5

Sorry if this is a basic question, but how do I add a formula for a “checkbox” control in the table if I’ve already got one there for the “select” control? I don’t see an option to add a second formula like I can with conditional formatting.

Use multi-select control to filter view on People column
#6

No problem. The secret is in the formula itself :
If(CheckboxControl, YourColumn.Matches(YourSelectControl), This table)
Your Select control is the reference to the second control. You can add as many reference to controls like this, SwitchIf can also be useful if you want to switch between many controls.

3 Likes
#7

Sorry, I reformatted my doc and broke my control! I have two problems:

  1. the list is formatted as “Lastname, Firstname”. When I put the options in the control like that they come out as two options (due to the comma I presume). Should I wrap the names around quotations?
  2. the reference column is formatted as “Lookup from Table”. Could this be breaking it? If so, any way around it?

Thanks!

#8

Hi @Benn_Bennett - can you share the doc with me and I’ll take a peek?

But first could you try changing the control to be formulaic and point table to the same the ref. column and see if that works.

#9

Looks like changing the control value to be a formula worked for you!

1 Like