Automate generic name for a thing


I have a specific question.

I want to give the user the ability to give a name to a thing. Well, thats quite simple and not the problem. But… I would like to implement a way to give the user a pre-generated name to use as the name of the thing.

A simple example would be like how OS Windows works: If you want to save a (text) file, it will give you a pre-generated name called ‘untitled.txt’, based on the fact if there is or is not already a file named ‘untitled.txt’, otherwise it would be ‘untitled1.txt.’, ‘untitled2.txt’ etc…

Is this possible in Bubble?

Thanks in advance!

You can use calculate formula to generate random string in bubble and save that in DB.

You could simply prefill the name input element with “untitled” - and then do a count of a search for things with the name “untitled” plus 1

But… that wont’ guarantee the same name won’t be used more than once (i.e. you could end up with 2 things called “Untitled3” for example.

So yes it’s possible - but it won’t guarantee uniqueness (and in this particular use case there’s no way to do it).

If you’re NOT talking about prefilling an input element with the name, and only saving it in the database then that’s different…

It is possible (but still difficult to prevent duplicates)… although you could use the built in Slug field for this instead, which does this automatically.

1 Like

Going to try this out. It doesn’t matter if there is no guarantee to have a unique name. I just want to give the user the ability to not feel obligated to type something in.


Awesome to know this is an option, though im going to try the solution below first. Thanks anway!

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