Hi everyone,
I have a bit of a tricky one! My app is effectively a CRM. All my customers use one app, and they store all their customers in there. Privacy rules very important so there is no overlap.
- Users need to create custom fields, and be able to attach it to another data type.
Example: Create a custom field of type “user”, against the type “customer”.
- They need to be able to add/remove these to the front end, so they can effectively configure their own view/dashboards with these custom fields.
Example: On the customer profile page, they add the above example to show who the “Assigned Sales Person” is.
- They need to be able to edit this field in the front end.
Example: They go to the customer profile page and want to change “Assigned Sales Person” from Person A to Person B.
Anyone done this successfully?
Yes, and it does not require doing something impossible like allowing users to create new data fields in the database.
You as the developer create the data structure of the app to allow for the functionality the app requires to operate successfully. In this case, all you need to do is have a data field on the Customer data type that is of type User and call it “Assigned Sales Person” then as the developer build the functionality for the user of the app to add the User to the data field via workflow actions just like you would for any other database interaction.
In a nutshell you want a pseudo bubble inside of bubble.
App should dynamic database configuration and also dynamic elements rendering.
You either can done that using a lot conditions (probably more than +1000) if you don’t have predefined use scenarios( like templates) or code all of that and wrap it into a plugin.
And this is just for 1-2
1 Like
Think you’ve mis-understood. The field name, type and value all need to be specified by the user.
Each of my customers should be able to create their own unique fields that are only visible to them.
What you’ve suggested would mean I have to create unique fields on request, every time, and then configure the front-end to prevent other companies seeing the wrong fields.
Not completely…
Unfortunately, without some code that allows you to create the database dynamically, this is not possible. You could potentially reach out to Bubble support to see if it is possible to create the database types and fields dynamically with some code, but I don’t believe they would provide a portion of their ‘secret sauce’ since Bubble has already made clear publicly, their editor is what we pay for and is their core value proposition as a company.
However, you can Fudge it by setting up a single data type with a single data field of type text and then allow your users to interact with input elements to name their data types and fields and you as the developer will setup the app to take those input values and structure it as JSON and make everything else throughout the app utilize that JSON formatted single text field.
1 Like
Thanks for the input - all makes sense. It may be that I just have to suck it up and create these manually on request.
Cheers.
Hi!
Did you find a solution to this? Cause I found a good way to do this and allowing users to create as many custom fields as needed.
Basically create a json structure and store it in a new “Custom Fields” Lisft of Text field in the data base
Then you create inputs to get the name, value and field type and store it in a json object which will be one text in the list of texts
(
“name”:“Color”,
“value”:“White”,
“type”:“boolean”
),
(
“name”:“Size”,
“value”:“XL”,
“type”:“boolean”
)
In this example you store two text objects inside a single List of Texts, each containing a list of 3 key:value pairs built dinamically which you can display it as the data souce of a Text RG
you can use regex or a plugin to take json values off of each text to visualize it in the RG’s cell
You might also need to create a custom Cell group for every Custom Field Type you allow (boolean, text, number) to dinamically change how each field is visualized in the RG. For example you can allow users from the UI to somehow choose a thing and store the unique ID in the json, adjust the RG to dinamically change the group displayed in the cell to search for the thing with that unique ID and pull some data off of it.
The possibilities are endless.
1 Like