Importing CSV to database & updating option list field

Hi, I am having issues importing our products into the bubble database.

I have a database of products (CSV) and each product is a mobile phone tariff. Each product contains a list of included countries that come with that tariff.

To achieve this, I have created a product database called Products, one of the fields is a list field connecting to an option set I have created called “countries-included”. I have populated the option set with all countries.

The problem I am now having, is how do I upload my CSV product data without having to manually go into every record and select about 50 countries from the option set?


So I have added a field to a test country product record for countries and added the countries as a list in that cell/field with each country separated by “;”

Below is an example:

But how do I now tell bubble to select the options from the option set?

Below is my option set:

And below is a sample of my product data showing the fields:

(Note, we are using the list/option field “Countries Included”)

I have asked AI to solve this for me and it suggests using workflows and/or backend workflows but nothing I am trying is working.

Any help hugely appreciated. :slight_smile:

Feels like this should be a data type rather than an option set (because you may wish to change values outside of the editor or search for plans). Have a data type Plan which contains data (number, MB), term (number, months), cost (number), rental (number), country (List of Countries , option set) and have an option set which is a list of every country.

Then just upload CSV into data tab.

Hi, Thanks for the response on this. Forgive me if I have misunderstood…

I have already got the product data as a data set and the countries as an option set. So every product I am uploading is uploading as a data set. I then have a list type field countries which is set to option set (set to the option set full of countries which never change as it contains every country we deal with)

If I have understood this correctly, How do I then upload my products to the dataset without having to manually select the country options within bubble to set all countries in that list field to their relevant options in the option set?

Ah… I can’t remember off of the top of my head and not at computer but you should be able to upload your CSV with one column that has a list of Countries. The name of each country (separated by a comma, maybe a semicolon works too) should match exactly the display of the country in the option set.

What are you seeing when you’re in the validate data area of the upload?

I have tried this. Data im uploading (test data) is below:

So im importing it into bubble and then mapping the fields as below:

and im getting this result in my app data:

Does this mean its worked and all i needed to do was that? And if so…Its imported the countries correctly (United kingdom, Germany, France) but it seems to have missed out the last country in the spreadsheet field “Belgium”. Is this something I have done wrong? I have checked and Belgium does indeed exist in the option set. I note it didnt replicate this process for the second product (50mb) either and shows no countries for some reason.

Thanks for all your help with this :slight_smile:

Hmmm… to debug, can you create a new Option Set (you can use the extension helper to bulk import it) and create a new Countries list field on the data type? I’m thinking maybe it’s considering deleted option set values or some other issue we can’t see…