Im very new to Bubble, so apologies if not even the headline makes sense.
Basically im trying to create an internal simple impact assessment, where users need to add multiple inputs - and at the end click submit and the data will be stored in the database.
Users will be asked to input:
As is process,
To be process,
Impact type (e.g.Process, Data, Technology etc)
and Impact level (Low, Med, High)
I’ve set it all up, and got it to store the data in the database.
What I’m struggling with is that one impact, that has 1 as is, and 1 to be. But it can have multiple Impact types e.g. Process and Data that can have each is impact level e.g. Process( High level impact) & Data ( Low level impact).
How do I add this as an option for the user, and to get it stored in the same impact database?
the part you’re stuck on is basically that one “impact” needs to hold multiple impact types, each with its own impact level. in Bubble you can’t really cram that into a single field, so the clean way is to treat each “impact type + level” as its own linked thing.
the setup that works is: your main Impact record stays as-is/to-be/etc, and then you add a field on it called something like “impact_details” which is a list of another datatype. that second datatype would just be two fields: impact type + impact level. when the user adds multiple types, you create one new detail for each pair and add them to the list on the main Impact. everything still ends up inside one impact entry, but structured properly.
this is how Bubble expects you to store repeating structured inputs, and it scales without making your database messy. if you want, I can show you the exact workflow steps to create the impact_details on submit and attach them to the parent impact.
To add to what iamcharlesac said, here is how you would set it up step by step:
Create a new data type called ImpactDetail with two fields:
impact_type (text or option set)
impact_level (text or option set - Low/Med/High)
Then add a field to your main Impact data type:
impact_details (list of ImpactDetails)
For the UI, use a repeating group to let users add multiple impact type/level pairs. Each row has a dropdown for type and dropdown for level, plus an add button.
In your workflow when user clicks submit:
Create the main Impact record first
For each row in the repeating group, create a new ImpactDetail
Make changes to the Impact and add each ImpactDetail to the impact_details list
You can also use a custom state to temporarily hold the list before saving everything at once on submit.
Sounds like you’re on the right track, the only thing you’re missing is how to structure the data so one “Impact” can have multiple impact types + their own impact levels.
The easiest way is to create a separate data type, something like Impact Detail, with fields like:
Impact Type (text or option set)
Impact Level (Low / Med / High)
Linked Impact (the main Impact entry)
Then in your form, instead of trying to store multiple types + levels in the main Impact thing, you let the user add as many “Impact Details” as they need. Each detail gets saved and linked to the main Impact record.
This way, 1 Impact can have:
Process → High
Data → Low
Technology → Medium
…as many as you want.
On the UI side, you can let the user add rows using a repeating group or a “+ Add impact type” button.
This is the most flexible and clean way to model it in Bubble, and it’ll save you headaches later if you need reporting or filtering. Hope this helps.
Hi connect10 - Also thank you for taking the time to write an answer.
Im a bit unsure how to set the UI and Workflow up when following your guide - could you expand on it please?
I’ve found a a way to do it - but unsure if this is the best way.
These data inputs ( as is, To be, Impact Level and Type) will need to be used for dashboards etc.
I dont know if in bubble you can take the whole data field with all the types ( as is, imapct level etc) and use in a dashboard.
This is the data i get in one field - There would be tens of these fields: