[SOLVED]How to search across multiple fields with Input?

Hi everyone,Bubbler!
Thanks everyday.

I’m working on a search feature in my Bubble app and need some help with implementing an advanced list filter. Here’s what I’m trying to achieve:

Goal: When a user searches for “john instagram,” I want to extract User data that contains both words (“john” and “instagram”) in any of the specified fields.

User Database Fields:

  • user_name (text)
  • tools (List of Option set - tools)
  • body (text)

Desired Output: For instance, if the user searches for “john instagram,” I want to filter out users whose user_name contains “john” and whose tools include “instagram.”

Example Scenario:

  • User searches for “john instagram”
  • The search should return users where user_name includes “john” and the tools list includes “instagram”

Could anyone guide me on how to set up this advanced filtering in Bubble? Any tips or examples would be greatly appreciated!

Thanks in advance for your help!

If you set it up right it’s pretty easy. (Warning if you try different workarounds you may end up with a total cluster$%^&*).

Create a text field “search data” (or a new dataset if youre gonna have 500k+ records) and dump all data that has to be searchable in it (e.g., username, tools (as text), etc. :lower case). Use DB triggers to update search field whenever any of the relevant data changes (if there are many ways for it to be changed; if just a few, update search data field at those entry points).

Then for the search just search the search data field for EACH seperate word (lowercased) in the searchbox and display the results that have each search term

1 Like

Hi, code-escapee!
Thanks!

Update: Solved the Advanced List Filter Implementation

Hi everyone,

I wanted to give an update on my previous question regarding the advanced list filter implementation. After some testing and experimentation, I was able to successfully implement the desired functionality.

Thank you to everyone who took the time to read my post. I appreciate the support from this community!


スクリーンショット 2024-05-22 15.09.36

I’ll try not to say i told you so when you run into major overages and timeouts due to your workaround. :zipper_mouth_face: but its your app to do how you want…

the ux will be terrible as it’s case sensitive and the tools will not be searched at all…

1 Like

Hi,code-escapee!

corrected edition

Any field did not work properly, so we corrected it in the following way

Primarily used the append function to combine the fields to be searched into a single string. Then, an AND search was performed on that string.

You mean exactly like this? :point_up: :grinning:

Dont forget to lower case and strip out characters that shouldnt break the search…

1 Like

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