Filter Item from PRG if unique ID is in database


I am trying to get a filter to work in my bubble app but have seem to come up against a well. The use case is that I have a community and I am allowing users to block other users. When they do it creates an entry in the “Blocked Users” database where users= the blocked users unique id and the creator = the current user.

I was able to create the create a filter where the blocked users posts are no longer showing in the feed while they are blocked, however, I would also like to have the filter function to hide the posts from the user who originally blocked the user so neither parties can see each others posts.

Any ideas on the best structure for this? Pictures below of what I tried. Thanks, Allen


Why not make a new field under User called “Blocked Users” and make it type User (make it a list)

Then for example if you have a repeating group for posts, you would have the constraint be “Current User’s Blocked Users doesn’t contain This post’s Creator” (Maybe this would work without the advanced filter not sure without me testing it)

Then the filter would also have another constraint “Current user isn’t in This Post’s Creator’s Blocked Users” Then that would cover the person that was blocked seeing the blocker’s posts.

I did that at first, but I couldn’t figure out how to turn that list into a retreating group that showed a list of the blocked users. I was trying to list the names individually as a lot using a repeating group, but every time I tried it listed all the users of the group in each row.

So if you have a repeating group and you want to view the users the current user has blocked, just have a repeating group with the data source “Current user’s Blocked users”.

Or am I misunderstanding?

If you’re trying to list them just as text you can just do “Current user’s Blocked User’s:each item’s Name”:split by “,”

@tylerboodman thank you for the feedback. I have been using the current filter, but it is filtering all the posts rather than just the one “This Comm Post’s Creator’s blocked users contains Current User” which is supposed to be hiding the posts from the user who blocked the current user. Any suggestions?

If the result of the filter is “yes” then it shows that post. So if your filter is “This Comm Post’s Creator’s blocked users contains Current User” Then it would only show the post if they were on the blocked list. Try switching “contains” to “doesn’t contain”? Let me know

@tyler11 When “contains” it hides all posts regardless of creator, if “doesn’t contain” shows all posts including the blocked individual. Same functionality if using Parent groups Comm Post. Here are images of the full data source/filter.

@tylerboodman figured it out was a privacy setting issue. Thanks for your help!

Oh good because I was looking at your screenshot saying “damn that looks like that would work” :joy:

This topic was automatically closed after 70 days. New replies are no longer allowed.