How to display user profiles that match a criteria?

Hi there. I am creating an app in which the sign-up process asks the user for their favorite fruits.
At the end of the signup process, I want to show the user a repeating group consisting of other users who have any of the same favorite fruits.

Not sure how to phrase the search here.
All help would be much appreciated!

Hi there, @satvik9b… if you are storing a list of fruits on the User data type, then an advanced filter like this would do the trick.

If you are not familiar with advanced filters, one thing to keep in mind is that the filtering takes place on the client side, meaning the search is going to return all of the users to the browser and then filter the list down to the matching users. As you can imagine, such a filter can be slow if you have a lot of users in the system. So, if you can apply one or more constraints to the search to limit the number of users that need to be filtered, that would definitely improve performance.

Oh, one more thing… you will need to make sure your privacy rules on the User data type are set up in a way that allows the search/filter to run. For example, if you have the default privacy rule of This User is Current User in place on the User data type, no users will be returned in the search because the current user doesn’t have access to other users and their data.

Anyway, that might be more than you wanted/needed, but I hope it helps.

Best…
Mike

3 Likes