Custom fields CRM (Hubspot style) DATABASE Things


İ want to offer my end user create their own data types for their CRM solutions.
is there any way i can do it like i thought i can create TEXT Data type,
it has 3 thing;
then repeat it for number, date, yes/no.
but is this way realy optimised?
i asked some software engineers araund me they told my creating new MySQL databases for each customer is looking good for you solution.
did someone ever tried to create a database like this ? imagine like hubspot its a crm and you are creating you own data types for your own.

This question comes up fairly often here in the forum (not surprisingly, as it’s a fairly common thing to need to do in CRM type of apps). I think you’re on the right track…

It’s actually fairly simple… (I’ve done this multiple times in different apps, and looking at the database/API schemas of certain major commercial CRMs this seems to be a fairly standard way of doing things).

To to it in Bubble, you just need the following:

An Option Set to determine the ‘Type’ of the field e.g.

Custom Field Type
Text (short)
Text (long)

Then you need 2 datatypes: 1 for the custom fields, and one for the custom field values:

Custom Field
Name (text)
Type (Custom Field Type)
Created by (User)

Custom Field Value
Custom Field (Custom Field)
Type (Custom Field Type)
Text Value (text)
Number value (number)
Date value (date)
File value (file)
Yes/no value (yes/no)
Contact (Contact/User)

That’s the basics of the database structure… (you could also add a list of ‘Custom Field Values’ to your Contact datatype) - (you could also simplify the custom field value datatype, by just using a single text field for the value, instead of different fields for different types, but it might make things more complicated on the front end).

So then you just need to create whatever front end interface you need for allowing your Users to add their own custom fields, and assign values for contacts.

Display different input elements based on the custom field type, so that users can enter the required data.


hi adams,
thanks a lot for your intererst you been so helpfull and solved my problem quickly.

hava a good day.

adams hi again,
when i want to create a new database item for costum fields what is most optimised way do you have any idea?
should ı create 5 workflow steps with conditions like the screenshot?

am i gonna repeat it for each costum field type?
and can you recommend any forum links to read this kind of experiment?

Yeah, you can do it that way…

Or you can just use a single action with all the fields being set in that one action (obviously, only 1 field will actually get set)… depending on how you have things set up, you might need to use some Boolean statements formatted as text to set certain fields… but it’s more efficient than using multiple workflow actions.

That said, there’s really no difference - whether you use 1 or multiple workflow actions… so whichever you find easier.


In practice yes, but when factoring in WU, in my experience if you’re ‘making changes to a thing’ and changing the same thing in each of the workflow actions, using 1 step will cost the WU of just 1 change, whereas each additional workflow step accrues similar WU. I can make changes to my type recipe, and change 30x fields with calculations: 1.4WU. And then another WF action to make changes to recipe: change RecipeName: 1.2WU. But If I include the RecipeName in the same step as the 30x fields: just the 1.4WU total.

Yeah, but that’s not what’s happening here (there are no ‘make changes to a thing’ actions involved in this).

In this case only one action is running (and there is no WU cost involved in evaluating the action conditions)… so the WU cost is the same regardless of using a single action, or 10… (only 1 action will actually run).


thanks a lot for your helps but unfortunately couldnt figure it out how to desing an UI for this data structure will i create first a repeating group for “deals”(which has costum fileds) then another repeating group (as 1 row) and and then inside that a repeating group (do a search for costum-field-values) with 5 kind of inputs (with conditions for costum field’s type) ? or can i use bubble’s table element? i couldt figured it out

1 Like

I’m bookmarking this as your most recent revision of this answer :laughing:


This question is somewhat related to this QnA. It’s regarding User Defined Fields.

For example, let’s say a company uses the CRM for sales. Another uses it for volunteers, and another uses it for recruiting.

Company A (Sales use case) might refer to the field as a “Lead”
Company B (Volunteer use case) might refer to the field as “Volunteer”
Company C (Recruiting use case) might refer to the field as “Applicant”

Each company might have its own vocabulary and, thus, might like to call fields in the UI things that have meaning for their business.

When someone logs in from a company, I’d like for the fields in their implementation to change to their vocabulary as outlined in the above example.

This is a SaaS application that could have a similar application for dozens or hundreds of unique companies.

What comes to mind regarding a solution? Conditions seem obvious, but I wonder if there’s a more elegant way given the potential number of companies that might want a change.

**These companies might need their own data types that would show up in things like drop-downs. If I’m reading your original Option Set solution correctly, it might be a solution for specific data in specific company drop-downs, etc. Again, the data would need to change based on company login.

Appreciate it

Hey @adamhholmes, is it possible to enable custom dropdowns on these user defined columns? I see where you are going on the approach you outlined though I’m not seeing how I could also implement a custom UI on top of this. Date picker for dates, dropdown for text, etc. For something that gets asked about so much here, there is zero documentation outside of the forum on how to do this efficiently.

You can just use conditions to show the appropriate input elements.

okey i have to say i have been working on my saas tool for more than one year and its not a simple task to have a dynamic database desing for your users
hard part is
1-your app logic and porpuses will need static data
2-your app’s ui desing will need static data to be functional
3-your entire desing can get realy messy whit custom desing solutions for your users.
4-database static fields lets you use confirmed formations of data if you try to have custom fields you will mostly use (format as text) function which will also can get realy messy (for example date fields will be fomatted on your ui as simlified extended iso format and when a user want to add a date value to that custom field from for example zapier or any external api you should considered this sitiations too
it might also just me seing this kind of structure is realy hard there might be some better solutions.
but my desing looks like its working for now just problem is if you are considering a end user friendly app you are going to need some documentation for this kind of situations