Forum Academy Marketplace Showcase Pricing Features

Complex Database Selection

I am trying to select the top 3 “Users” based on the skills inputted by the current User:

  1. If a User has the same Skill 1 + same Skill 2 + same Skill 3, then the top 3 Users with the highest Stars ranking will be selected.
  2. If a User has the same Skill 1 + Greater than Skill 2 (Skill 2 is a number) + same Skill 3, then I would select the top Users from this group (minus the top users from Group 1 )
  3. If a User does not have same Skill 1 + but the same Skill 2 + the same Skill 3, then top X here
  4. If User does not have same Skill 1 + greater than Skill 2 + Same Skill 3, then top X here
  5. If User does not have same Skill 1 + Greater than Skill 2 + Not same Skill 3, then top X here.

The method I thought of is to create a list of States. Then, somehow go through each User. For Row 1, assign 1,000,000 points plus number of stars. For Row 2, assign 100,000 plus number of stars. For Row 3, 10,000 plus stars. For Row 4, 1,000 plus stars. For Row 5, 100 points plus stars.

Then I would want to somehow find the Users with the top 3 points. Those are the selected Users.

I’m not sure how to do this in Bubble. For example, how do I create States that are somehow linked to Users, without writing to the actual User database. How do I have Bubble go through each User to assign points to the relevant State. Then how do I rank the top 3 Points states, and then pull the User Names + image to display them?

Sorry for the long question. Help much appreciated.

Can anyone help?

Hi! :wave:

  1. Load your users in a repeating group.

  2. Use the logic you described to set points to the users based in their skills. If line one is true, points = 5. If line two is true, points = 4…. You can use conditional logic tab for this.

  3. Now use the plugin below to extract these points (and the Users) from this repeating group and display them in a new repeating group sorted based in their points. :+1:

I assume it will work!