CSV Upload - CRUD

Hi all,

My users need to be able to upload a CSV file, and have that file either create new records, or update/delete existing records, where a unique ID in the CSV, matches the unique ID in the database.

All I’ve been able to do so far, is allow users to create new records, but not overwrite existing ones.

Any ideas on how I can do this?

Your CSV upload must have the uniqueID of the bubble object you’re working on.

Let’s say this is “events”
Events with NO uniqueID are considered new, parse those out and send them to the creation workflow

Events WITH a uniqueID are existing, parse those out and send them to an update workflow.

Is there any way to force Bubble to look at a different unique identifier?

No, you cannot override or manage the bubble UniqueID.

If you want to manage this on your own, you would probably have to create a datatype that processes the CSV upload. then every time you upload via CSV, for each row you create this “Process_Row” object with all of your fields. Then for each object, you could look up your own ID and see if it’s new or existing and do the 2 workflows I mentioned above.

It depends if your csv plugin allows you to do some of this, but I’ve never seen it yet.

1 Like