How to set up search in bubble

Options
Karl -5667863
Karl -5667863 Member
edited December 2022 in Bubble
Hi guys, I want to create a dynamic repeating group in bubble which has some drop downs that could filter out the results in real time is there any bubble experts out there that could help? 

Comments

  • Gavin McMurdo
    Options
    If I understand what you want to do correctly - based on what is in a bubble input, that needs to be used to change what is returned to the repeating group. I did this by having the various entry fields on the top of the page and then to use these as inputs to the xano API which in turn were used as part of the query.  LMK if you need more info and I'll do some screenshots. 
  • Karl -5667863
    Options
    awesome - thank you! 
  • alter345
    Options

    Hi @Gavin McMurdo and @Karl -5667863 and thanks for your response - im currently working on the same thing, in fact, i have an api call used as "data" on bubble to get all the contacts to a repeating group.

    On the top of the page, i'd like to have :

    • An input to search by name
    • Some other input to search by (statuts, dates etc ...)

    My question is : do i have to set up different call API in bubble (on with GET to gather datas and a second one used as "action" to use these inputs ?) or is there any other good solution ?

    If above is the solution, how am i supposed to change the source of the repeating group when i get the result of the search ? (or maybe i can create an invisible repeating group for results and display only when search in fill out ?)

    Thanks in advance if you can share your experience ;)

  • Gavin McMurdo
    Options

    OK, let's make sure that I understand your questions properly - please correct me if I miss something:

    Can you have multiple optional input boxes in bubble that pass data to your backend API - Yes, just mark them optional and blank in the bubble API config screen.

    Do you need a different API - No, just mark the input data as above. The trick is that bubble doesn't handle a morphing data response very well. In these cases, I return multiple returnResults for each of the return results where the structure has changed. e.g. returnResult1 has a list with name, date, single location and status and returnResult2 with name, date, location list and associated status. Naturally this can easily be don't if location was alway returned as a list but as you're aware, bubble struggles with nested lists. In this case, I have multiple repeating groups that are associated with returnResult1 and returnResult2 and are only visible when they have data. I set this using conditionals.

    Plz LMK if I understood your question properly. @alter345

  • alter345
    Options

    Thank you Gavin for your reply, and sorry for my English

    I tried many things, and in fact we can mark input optional and blank in the bubble API config screen ==> So it works fine for me now

    So i can ignore empty search as well

    Understood for your example returnResult1 and returnResult2

    thanks for your help @Gavin McMurdo