Trying to improve our home feed. I need to make it so only posts with any of user's joined communities in its list of tags (communities) show up but not working

Quick background for context, this is a social intended app, and here we’re looking at the posts showing up on the main feed. A tag is a thing with a name, banner, etc. So imagine, a tag called “cats” with a cat picture as its banner. Essentially a community. It’s pretty straight forward.

So. The idea is that the user can join different communities which are just tags. When they join a tag, the tag gets added to current user’s “joined_tags”, a list of tags. Separately, when an user creates a post, they can add different tags to it since a Post has a “tags_list” which is just a list of tags. Simple right?

So, a post has a tags_list. And, an user has a joined_tags list.

Now… I need the home feed to only posts where their tags_list contains any of current user’s joined_tags. Simple right? I can’t get it to work though… I’ve tried using advanced filters and regular and other workarounds but still failing. Can someone help and check my setup to tell me please what I’m doing wrong? Or any pointers at all? The entire intersect thing confuses me a bit…

This is my setup:

Captura de pantalla 2023-07-14 203137

edit: I’ll also appreciate any suggestions for workarounds I can try… I’ll happily give anything a shot. This means a lot to me as it’s holding up a pretty important part of development for us and I do have to push this update out to our community as soon as possible… thank you anyone that takes the time. Please help. I’m the only dev our team has…

Edit2: Hello everyone. I need to get this update out ASAP for my platform but couldn’t find a proper solution fast enough (plus all the hours I’ve invested so far already…) so in the meanwhile I post a workaround for anyone else that needs it in the future.

My work around is that in each tag (community) I created a field of “list of posts”, so whenever a new post is created I created a workflow of Make change to a list of things (Tags)… then for each tag, add the post that was created to its list of posts. That’s it. Then on my repeating group my source is "Current User’s joined_tag’s:each item’s: list_of_posts (the new field I just made). Cheers. Still interested in a solution to this if anyone knows a more efficient workaround (unless this turned out better, also totally curious about that!).

update: Turns out I was using the wrong field… solved! :slight_smile: how silly. Either way leaving this here for anyone in the future if it’s helpful in any way!

Hi there, @julpereira82… what you are showing looks like it should work, so I’m wondering if it’s a privacy rules issue. Do you have any privacy rules in place on the Post data type that could be getting in the way?


1 Like

Hi Mike thanks for your answer.

I actually don’t… I don’t have privacy rules of any kind at all. I inspected the repeating group further and this is what I see:

I’m really not sure what more to try… workarounds are welcome too if anything.

Updating… I just tried an alternate, seemingly parallel version and the advanced filter says “no”. I’m very confused.

The new filter I tried:
Captura de pantalla 2023-07-15 144604

When I inspect the repeating group I see this:

I’m really hurting my head over this. I’ve been trying for so many hours… any pointers anyone please?

If you’re willing to let me take a look under the hood, shoot me a link to your editor via direct message and I’ll poke around.

1 Like

Mike, thank you. I just figured it out! I feel so silly… It was my mistake apparently but in the meanwhile I did a workaround that shed light on the actual issue (turns out I had 2 separate tags_list fields and I used the wrong one, not sure why I had 2 of them). I’m curious however, is it still more efficient to use intersect with, than the workaround I did?

So, using intersect with vs. just setting the data source to current user’s joined tag’s:each item’s:list_of_posts? (assuming I add every newly created post to each tag’s list of posts).

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