Forum Academy Marketplace Showcase Pricing Features

Problem with database searching

Hi all,

I am able to populate a repeating group with users who match ALL criteria set by a series of constraints.

However, what I need to do is the following…

I want the user to be able to check boxes (or select multiple options some other way), and the repeating group to populate with matching users who’s data INCLUDES the selected item, and then whittle it down and down as more check boxes are ticked. Also, I need to have a user shown in the results, even if he has a yes for a field the searcher has not ticked - i.e. something like the following…

User A has the following data (excluding the norm):
Apple - yes
Pear - yes
Orange - yes
Grapes - yes

User B has the following data
Apple - yes
Pear - no
Orange - yes
Grapes - no

  • Searching user checks Apple, returns User A and User B (both users have yes for this field)
  • Leaving Apple checked, searching user then skips Pears and checks Orange… returns A and B again (A has pears as yes, but still shows even though searching user did not select it - both have yes for Orange)
  • Finally, Leaving Apple and Orange checked, searching user then checks Grapes… returns A only, as User A has Grapes as yes, and User B has Grapes as no

I am trying to achieve a process where someone can do a search by ticking multiple selections, and for the users to show who’s data CONTAINS the selections chosen, and each time a selection is chosen in addition to previous, it reduces the number of repeating group elements populated, as less and less users on the database have data containing all checked items.

Sorry if this makes no sense. I am brand new to Bubble and it’s stumping me a bit.

Any help very, very much appreciated.

Cheers

when you define the data source of your repeating group and write an expression “do a search for” you can add constraints to that expression. constraints will limit the search results based on a criteria that you set up. In the constraints you can for example say that the “fruit” field should contain the value of a certain input (Where the user types the fruit that they want to find users for) or you can have multiple checboxes and list them all in the constraints of your search.
Hope it makes sense

Thanks,
Levon.

Founder at Bubblewits - Bubble Certified Partner


http://iambubble.com - one page Bubble demo
http://builtonbubble.com - Collection of apps built on Bubble
Dev.zeroqode.com - Reach out if you need help creating something on Bubble

Hi Levon,

Thanks for that. I had been playing around and think I finally figured it out. I am a complete noob so am picking things up with a loose grasp of logic, and a lot of trial and error.

I appreciate your response.

Andrew.

1 Like