Checking if Multiple users have the same item on a list

So I’m currently working on a Twitter like site, and what I want to do is have a follower count on user’s profiles. Every user has a “Following” list which contains every user they follow in a list, however I want to be able to check how many of said users are following someone while using the list.

In short I want to count the number of users that have a specific item on a text list, how would I achieve this?

I’m making a few assumptions since I’m not 100% on your data structure but I’m assuming your “Following” list is a list of usernames (texts).

If this were a badge on a user’s profile, for example, the expression you want is “Search for Users : count”

Where the search has this constraint > Following contains “Profile User’s Username”

If this were in a repeating group, the constraint would be “Following contains current cell’s user’s username”

That should do it. I would recommend that instead of Following be a list of texts, that it instead is a list of Users so that if you ever want to display something like “Current User’s Following” in a repeating group, it’s actually a list of Users and you could more easily display username, profile photo, etc.

Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources

Ah sorry, it actually is that, just typed this in kind of a hurry, but thank you very much for your help

1 Like

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