Add thing to database if it doesn't appear in search results

Hello. I’m new to Bubble. I’ve built a search box and connected it to my database. When user types something in it, if the item exists in the database, the item shows up in the list. If the item doesn’t exist in the database, nothing appears.

I want to add an option to allow user to add the item to database if the item doesn’t already exist in db. Tried looking for past articles in the forum but seems like the previous way of doing it is deprecated. How would you do it?

Hi there, @sina… check out this thread… it should help.



If I’ve understood your post correctly I think you need an additional workflow action.

It sounds like you have a Workflow set up for storing the data if the search box shows a result has been found. If you have a Save button modify this workflow to include a Create New Thing action with Thing being the datatype you’re working with but make this conditional:
Screenshot 2022-03-29 at 16.35.44

SearchBox A’s value will be empty if no search result is found. Searchbox A’s typed text can then be used to name the new thing you are creating.

Also make sure you have this option enabled in the Visual Editor for your Search Box.
Screenshot 2022-03-29 at 16.37.41

Hope that helps!