CSV uploader - 'deleted thing' error

I have a datatype Quote in my DB. It consists of the following fields:

  • Quote author (type: “Author” > which has two fields > Name and count)
  • Kategories (list of type: “Kategory” > which has two fields > Name and count)
  • Quote text (type: Text)

I am trying to upload multiple quotes using CSV using the Bubble’s fileuploader. I keep getting ‘deleted thing’ text in Katogory and Author fields :

Here is the CSV that I am using:
Quote Author,Kategories,Quote Text
Damaris,“[“habit”]”,The bad news is time flies. The good news is you’re the pilot

Now what I noticed is very interesting. I get the right data inside the database if I use “Unique ID” instead of name fields.

I have set the ‘Primary Fields’ accordingly (name for author, name for categories). And it used to work earlier with the Author datatype, and the Categories datatype that I replaced with Kategories later. But now it only works if I pass the Unique ID of Author’s name field, or Unique id of Kategory’s name field.

Does anyone have any idea how to resolve this issue?? :slight_smile:

Abdul.

Check that you did not delete the Kategories that are uploaded via CSV in your database.

It is an easy thing to overlook

The deleted thing is only referencing something that was in the database before, but deleted.

Maybe, there is a chance this is happening because the CSV you are uploading is populating a value that was never in the database.

1 Like

Hi Matthew,
Thanks for taking the time to respond. You are right that these small things can be easily overlooked. I have only a small number of authors and categories (4 or 5 each) and still, I am using only the entries that I created fresh. For some reason, Bubble can’t find these entries by their respective custom field “Name”.
So when I upload this:
Quote Author,Kategories,Quote Text
“Damaris”,“[”“Habit”“]”,The bad news is time flies. The good news is you’re the pilot

I get the deleted thing entry for both, the Kategory and the Author. However, if I replace “Damaris” and “Habit” with their Unique IDs from the database, I get these uploaded correctly. So this below works just fine:
Quote Author,Kategories,Quote Text
1678490960442x858803876965908500,“[”“1678489323466x589055355921104900"”]",The bad news is time flies. The good news is you’re the pilot

So Bubble is only able to find an entry when I provide the Unique ID, but it fails to find it if I use a custom field. And gives me a ‘deleted thing’ instead.
I also made sure that primary fields were set to the fields that I was referring to in the CSV upload but that didn’t make a difference.

:cry:

You could take some extra steps and utilize a search for the value in the database using the value from the CSV, which may be the name, and since you will be the developer and know the database values, can assume the names to be unique.

When I do CSV upload, I often utilize a data type for the processing, that I label as I normally would but append ‘temporary’ to it, so something like Product Temporary.

I use the temporary version to store the text versions of all data types as I want to use them in search constraints. Once I have run the actions to transfer from temporary to a normal data type like ‘Product’ I would delete the temporary version.

1 Like

Thank you, Matthew. That makes sense. But I wonder if that would bog down the servers? Let’s say I upload 100 quotes, and each of them has 1 author and 3 categories each, then I assume that I’d need 400+ searches and workflow runs to get that list into the database. How do you optimize this process for your apps? :slight_smile:

I perform the search to capture the list of possible choices, then I use that list in subsequent runs and filter off of that list…so search for things, send them into backend workflow as parameter and filter off that parameter.

But, I’m usually working with Option sets when I need to do CSV uploads.

1 Like