[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.

36 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!

5 Likes

Hi there Pals. Regarding this kind of User filtering, have you noticed some filtering inconsistencies? I tend to use this kind of trick, and hold a user table with user variables so each one filters and see data based on their choices.

I continuously have hard times tyring to track bugs related to filtering variables not applying to table filters, and i am fearing it is due to several users working at once, and that fact creating some kind of unexpected filtering behaviour based on filters syncing between both their documents.

@Juan_Manuel_Perez_Lostao personally I haven’t experienced any issues like that. I would suspect a flaw in a formula or the design of the filters, if you could share an example.

Thanks for your comment, Ed.

So far, it hasn’t happened again, yet it could be we haven’t happened to work at once on the document… its hard to track, as it is arbitrary I cannot reproduce it.

I can say sometimes cutting filter formula and pasting it again immediately fixed the problem, whereas for my users, sometimes just refreshing page was enough.

Maybe its already fixed

This video saved me - thanks!! It’s crazy how many of these I’ve had to create though, PLEASE add an option on table filters to filter by current user!

1 Like

Hi All, What is the best way to implement user-specific filters for dates?

1 Like

Hi @Paul_Danyliuk, this is an amazing setup. Thank you for sharing!

I’m only having one small issue though, which is that I cannot seem to figure out how to set this up in order to keep the blank = all functionality while also being able to search for blanks.

Does anyone have a solution for this?

For some reason when a user logs out and in again, they see everything unfiltered again instead of what is selected in the flows table for them?

We loved @Paul_Danyliuk’s solution so much that we made progress on making per-user search a core feature to Coda!

Just stopping by to share that progress has been made on this front!

3 Likes

This solution is great. But I don’t understand how to make this filter work on other pages without making changes to formulas.

I understood. I have to copy this page to make everything work, and not add this filter to existing pages.

Hi all! We’re collecting more feedback in this area. We’d love to hear more about how you use canvas controls in Coda, and the behaviors you prefer. If you have examples you can share or describe, let our team know here!

2 Likes