Forum Academy Marketplace Showcase Pricing Features

Validate a Thing's parameter before save to DB [SOLVED]

Hello Bubble community.
Is there an option to validate parameters before saving a new Thing to DB?
For example, I want to create a new Company. It’s name should be unique. There should not be more than one company with the same name in my application.

Not directly, no.

What you can do is control this with Conditional statements in the UI. So you can make the “Save” button only clickable when the Name is Unique. And have a hidden text box appear if it isn’t.

Another way would be to check this on the workflow (in the “and when” box) . So when you click the “Save” button and the Name is not unique, then you show a popup.

No doubt there are other ways too.

1 Like

Thank you! I’ve chosen a WF with “Do a search for…” to look for an existing entry in DB with the same name value and alert display in case when such an entry was found.