Forum Academy Marketplace Showcase Pricing Features

Change a Thing with Searchbox input result

I 'm new at Bubble! Cant figure out how to save the search input form’s result as either the chosen result that exists in the search or the typed result if it doesnt exist in the search. I am trying to do this in a workflow when the submit button is clicked. I have the search input set to allow entries not in the list while typing. I need this to change a field on a user if it’s typed in or selected from the search and can’t seem to make it work? Any help would be appreciated!

You can follow one of two approaches:

1 - As the search box can allow entries that do not exist in the source list you would have to create 2 different WFs, 1 for when the entry exists in the source list (value is not empty) and another when the entry is a new value (typed text);

2 - You can use a custom state to store the value as text, in both cases, and then when saving, use the custom state as the value to be saved.

1 Like


THANK YOU! This worked GREAT!!! I’m Searching for Company Names on Users. The result is a return that includes duplicates looking like this… Jones Express and Jones Express (1). I cant figure out how to eliminate the duplicate from the search options. Can this be done?

You can try use the plugin Searchbox: no duplicate Plugin | Bubble (I personally never used it)

So far, what I’ve had to do in cases like this is something like create a list that saves only the product names (no duplicates), if you already have a list, you could open it in Google Sheets and use the function “=unique (range)” to generate a list of unique products and then import it into the newly created list.

So, whenever you are going to save a new product in the original list (the one that contains all the product information), also make the product be saved in the product list (unique names) only if that product does not already exist in the list.

NOTE: The options listed in the search box as “Item, Item (1), Item (2), etc” appear like this because each one refers to a “unique” record in the DB, having only the same “label”, therefore, in this new list the data would be of the text type, and it would not be possible to link them directly to other data in the original list, except by comparing this textual value. It is up to you to check what would be the possible calls and searches made later with this data and use the most appropriate context of constraints.