How to Filter Collection based on members?

I’ve seen the developer docs for Collections. It is unclear to me: is there currently a way to filter a Collection based on the members of the cards? This would be useful, eg., to filter for cards shared with my partner.

I didn’t see a way to do this, but the system looks powerful enough that I am surprised it’s not already there.

For now, I am doing the following:

  1. Shared cards should inherit from parent with id: 13f0ede5-f40e-4eb1-8f7c-f0190c01731f
  2. I’ve filtered my own “Thoughts” cards to exclude cards descended from it or itself via its dedicated color (pink)
  3. To view the shared cards I would just look at children of 13f0ede5-f40e-4eb1-8f7c-f0190c01731f
  4. This has the downside that parent-child and color relationships might be out of sync with the actual shared status
{
  "type": "group",
  "op": "and",
  "filters": [
    {
      "type": "visibility",
      "op": "equals",
      "arg": 0,
      "name": "Visible",
      "inv": null,
      "case_sensitive": null
    },
    {
      "type": "parent_ids",
      "op": "contains",
      "arg": "13f0ede5-f40e-4eb1-8f7c-f0190c01731f",
      "name": null,
      "inv": true,
      "case_sensitive": null
    },
    {
      "type": "color",
      "op": "equals",
      "arg": "pink",
      "name": "Pink (color)",
      "inv": true,
      "case_sensitive": null
    }
  ]
}

Hi @mortalstarinventor,

So currently, you can filter based on the author of a card, but not on who has access to a card.

Your workaround using a parent card seems to be the best solution atm. Since if you and your partner share a “Family” parent card and put all shared cards in there together, then you could just have a collection that just shows direct children of that parent card. And then you can modify other collections as you have done.

We’ve made a note to discuss your use case internally as well and we will see what we can do to improve this :slight_smile:

1 Like

Awesome!

I think if I dug fully into sharing with the broader community I would ideally be able to separate:

  • my own unshared cards
  • cards shared with or shared by a specific collaborator (like my above use case, which for now my workaround addresses)
  • cards shared with or shared by anyone else (could be implemented as “has collaborators but not anyone in a list of specific collaborator ids”)
1 Like