I have tried to find the solution for this but it seems like an impossible task to perform in bubble.
I want to be able to
allow users to upload csv file with any amount of data
import new or update existing values in the db.
does not have to be done immediately, but possible to schedule
I found ways to upload new values to db. It kind of works.
But how do I update like a 1000 existing values in db?
How do I use unique id?
I have tried to use “_id” as it was in downloaded csv file, “unique id” and others but all fail.
I just get an error:
The column Unique id does not match with a field on the chosen type.
I have tried with , and ; as separators. Does not help.
It is kind of a big showstopper for me.
Users should be able to mass update values in db. It is often much easier to work with excel and import data. Updating of prices or descriptions in bulk is the very common thing.
I am considering using Xano or some other API backend, but prefer not to.
I’m on a project where the plugin 1T - CSV Uploader is used. It works well. Check the video walkthrough to get an impression of what it can and cannot do.
Of course it might not cover all of your requirements like a custom solution can.
Hi @gerbertdelangen
I have already tried that plugin, but did not get it working with unique id. I mean updating the values. Upload of new rows worked fine. I might have done something wrong. I will check it out again.
Example, there is a table with a list of countries which sometimes needs to be updated. For that I’ve created datatype CSV_country_upload to temporarily save the uploaded data to, which then is used to change the records in the country table.
When a file is uploaded through Bubbles file-uploader, the “1T - CSV Uploader” generates one or more files (Bubble has some limitations on the number of records in a CSV-file, so the “1T - CSV Uploader” splits the file up in multiple files of needed). The backend workflow process_country_uploads_router is triggered to process those files.
For every file a backend workflow create_csv_countries_upload is scheduled. This workflow contains the step to a create record for every line in the CSV-files.
The second step in the workflow create_csv_countries_upload is to apply the changes in table csv_countries_upload to the countries in the country table, this is done by a third workflow:
Thank you for the extensive explanation
I have already solved it and in a very similar way as you explain.
Good to have a confirmation. It works very well.