Back

How to filter List Documents with relationships

  • 3
  • Web
vishalxtyagi
28 Sep, 2023, 01:35

I want to filter the document based on reference which is a relationship with other table 'references'. reference field can be nullable

TL;DR
If you have document security enabled with read access for certain users, they will only be able to fetch documents they have access to. It is not currently supported to filter List Documents with relationships. To use OR between multiple queries instead of AND, you will need to make separate API calls. There is no direct workaround to filter relationships. If you want to show the guests of the person who is currently logged in, you will need to find another approach as it is not supported. You can filter documents based on a reference field that is a relationship with another table 'references'. The reference field can be nullable, but there is no solution provided
Drake
28 Sep, 2023, 01:36

Not supported

Drake
28 Sep, 2023, 01:37

Yet

vishalxtyagi
28 Sep, 2023, 01:37

then how can I do that, is there any work around?

vishalxtyagi
28 Sep, 2023, 01:38

I have to only show the guests of the person who is currently logged in

vishalxtyagi
28 Sep, 2023, 01:43

is there any other way? Please there must be something we can do if we can't able to filter the relationships

vishalxtyagi
28 Sep, 2023, 01:47

atleast tell me the how to use OR between multiple queries instead of AND

Drake
28 Sep, 2023, 01:49

Not supported yet. You would need to make separate API calls

Drake
28 Sep, 2023, 01:51

If you have document security enabled and documents are configured with read access for certain users, people will only be able to fetch what they have read access to

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