Back

[SOLVED] List users with query on prefs

  • 0
  • Users
whataboutno13
29 Mar, 2023, 13:56

Hi there, I know it is possible to list users as described in the docs here: https://appwrite.io/docs/server/users?sdk=python-default#usersList. Is it possible to Query the user prefs and if yes how would that query look like?

TL;DR
The user wants to query user preferences but realizes it is not possible. They consider creating an extra table for searchable data. Another user suggests assigning users to teams and roles to achieve grouping. The thread ends with the user thanking someone for their help.
Binyamin
29 Mar, 2023, 13:59

It's seems like you can work around the user preferences only after you get the user \ account instance Which means - for what I can see - there isn't any option to query (or group) by user preferences

But,

What you can do is add users to teams ( and assigned roles for them) then you be able to group them by team or team and role

whataboutno13
29 Mar, 2023, 14:01

Mhh, okay I think assigning them to teams would do the job πŸ‘ Thanks again @Binyamin πŸ˜„

Binyamin
29 Mar, 2023, 14:01

πŸ‘

whataboutno13
29 Mar, 2023, 14:01

[SOLVED] List users with query on prefs

whataboutno13
29 Mar, 2023, 14:05

Oh no, I just forgot that teams do not help me 😦 So I guess I have to create an extra table to store the data in to make it "searchable"...

Binyamin
29 Mar, 2023, 14:05

Why is that?

whataboutno13
29 Mar, 2023, 14:06

Because I specifically need to search for a set preference

whataboutno13
29 Mar, 2023, 14:06

and it has a different value for every user

Binyamin
29 Mar, 2023, 14:06

I understand

Binyamin
29 Mar, 2023, 14:06

Then yes your way sounds the right one

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