Hey everyone.
Can’t figure out. In my database “users” I have a field “followers” contains list of users. I want to find all users who have at least one common user in the field “followers”. Let’s say mine list of followers and I want to find other users with at least one match in fields “followers”.
Show a repeating group for Users, the data source being Do search for Users
, then close out of the search window and do :filtered
then inside the filter window add a new constraint, and scroll to the very bottom and pick Advanced:
then do This User's followers intersects with Current user's followers:count > 0
Make sure privacy rules don’t get in the way of users seeing other user’s follower lists.
However the Advanced filter is known to be slower because it can’t use Bubble magic backend searching constraints. So it will download all users to the client, check the filter then return the list. Not sure how large you think your database will get but just keep that in mind.
There are different ways to structure this. One of them being have a new datatype “Follower” with user fields “Follower” “Followed”. Then when someone hits follow create a new “Follower” and set the fields accordingly.`
Thanks! Will try it.
Sorry. I thought it works but it don’t. Don’t know what I’m doing wrong. I tried to do this action, but I only get myself in this list. I try to create a new data thing with this list of users
If you are only getting yourself maybe privacy rules are preventing the search from finding the rest?