Need help filtering a repeating group

Hi,
I have a repeating group that displays posts in a social media feed. I want to filter it by a list of Buddy’s (friends) and am having limited success.

The repeating group works as it should until I add the filter. The filter and data source are blue and no issues are flagged so feels like it should work.

The list I’m using to filter is My Buddy’s Username. It is a list of text in my User data type

When I run the RG with the filter it only displays the posts from Renegade. It doesn’t matter where in the list Renegade is or how many others are listed, it only shows posts from this one user.

I’ve tried using other types of lists, Type User and a list of users or email addresses or other user attributes. All of these result in an empty repeating group.

Thoughts?

Thanks in advance for your help!

Is there any reason why you’re using the list of buddies as text instead of a list of users?

I’ve tried it as a list of users but then I get an error saying it should be a list of text

In this case, you’re comparing a list of Users with a list of texts, which is why you’re getting that error.

But I’d like to ask—why are you storing a list of texts in your database instead of a list of Users? Is there a specific reason for that?

If not, I strongly recommend working with the actual User data type. For example, instead of having a field like Post Creator Username (as text), you can simply use Bubble’s built-in Creator field, which is already of type User.

That way, your search would look something like this:

Search for Posts > Creator is in Current User’s Buddy List (list of Users)

However, if you do have a specific reason for using a list of texts, let me know—I can help you get it working that way too. I just believe using the correct data types is the more efficient and scalable approach.

Hi,
no specific reason, just new at this and trying to figure it out. I have a list of users in my User data type as well. When I use that the repeating group returns no data.
image

I appreciate the help!

Are you logged in?
Did you set any Privacy Rules?

Logged in and no privacy issues. Learned both of those lessons the hard way!

Do you have any constrains in the Do a a search for?
I can see you are using filtered, but you can set all the constrains in the Search the remove the filtered. Look if you don’t have any hidden constrains in there.

That’s it! There was a constraint and the RG works after I deleted it. Is it better to use constraints instead of filters.

Thank you for the help, I really appreciate it!

1 Like