Back

Filtering Relationship Data

  • 0
  • Self Hosted
  • Databases
ZachHandley
15 Apr, 2024, 20:14

So I know relationships are in beta, but we are making a datagrid and I setup relationships because it made the data processing a bit more efficient for pulling things to display and such. We're trying to create a datagrid that displays members. Easy, cause we have a members collection. After that, we have a search, which also works great thanks to 1.5's search implementation.

The real issue is, we have a councils filter, because each member can be on councils. So we have that relationship, but we want to be able to filter by any council ID.

Do I need to make an array of ID's as a separate attribute with an event to update it, or can I filter by the relationship $id attributes?

It says I can't, but I'm curious if there's a way around it that's known or something

realistically I'd have to basically either make a second column that gets auto updated or maybe search by councilId and then display that councils members but I can't search in that relationship either can I?

TL;DR
Developers are trying to filter member data by council IDs using relationships in a datagrid. While it's not possible to filter directly by relationship $id attributes, developers could consider creating a separate attribute like an array of IDs or exploring other workarounds like updating a second column or searching by councilId.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more