[Video] User-specific filters (each person tweaks controls independently)

Yet another question that has been asked and answered so many times:

How do I let multiple people use the doc at the same time and change filters just for themselves?

Time to have the ultimate answer in one place. I recorded the video explaining how to do that using a helper table. I call this approach the Flows Table pattern.

TL;DR:

  1. Create a table where each row is linked to each Coda user. Set up its columns to act as controls (checkboxes, selects, multi-selects etc)

  2. Insert a view of this table whenever you need your controls. Filter the table so that only one row is displayed: the row for current User()

  3. A good idea is to make a named formula Current user to reference that row as well. The formula would be:

    [HLP Flows].Filter(User = User()).First()
    
  4. Set up your filters to not read from an interactive control or whatnot, but from [Current user].[Column with input]

Benefits:

  • You can modify values in these controls, e.g. with preset buttons, using ModifyRows. With canvas controls you couldn’t do that.

  • You can reuse this view across different pages and have inputs synchronized (since all these are just views of the same rows). With controls you cannot do that: you either duplicate a control and it acts independently, or you keep them in one place but have to switch pages back and forth if you want to use its value elsewhere.

  • You can choose not to expose these controls to your doc users at all, and just keep the Flows table privately to control which users see what. A makeshift admin panel of a sort (please be aware that neither filtering nor locking would prevent your users from copying the doc and getting access to all data, so this is not a security feature)

  • You can use this not only for filters, but for grouping and sorting as well. Just take this old trick and use input columns of the Flows table instead of canvas controls:
    Sort / group table with external controls

The template doc to play with:

Cheers. Please subscribe to Coda Tricks if you haven’t already. I’m going live on an interview about Coda on Aug 19, and this is the deadline for me to finally get my blog out, so that I could promote it. I’ll announce the interview later, if you’re interested.

18 Likes

I learned how to do this from you on another thread - thanks for the video, I am sure it will be really helpful to many!

I wonder if you have any ideas on how to use this structure to solve this problem…

I have tried and failed…

1 Like

This is a great guide. Thanks for sharing, Paul!

2 Likes

Answered in the thread. Yes, it’s easy when you know that AddRow() returns a new row.

2 Likes

Now this is a fantastic idea! And solves maaaaany problems for our clients that currently have to use a separate view for each person exactly because they are stepping on each other’s toes with filters. This probably cut the size of some of our docs in half!

3 Likes