1T csv upload of list field

I am trying to upload csv file with using 1T - CSV Uploader pluigin , but cannot find the way to upload files which custom bubble type has “list” fields.

The following snap is the server error message.

In this case we use this plugin, how can I create JSON arrary with user uploaded csv file?
I think it is very difficult for user to prepare files such a required format.

@eli
If you know the answer, please tell me.
Thank you

2 Likes

Did you solve this? I’m having the same issue. Some entries in my upload only have 1 item in the field that’s designated as a list.

Not yet.

Oh! I actually figured it out a few days ago. I’m just going by memory, but I can dig deeper if this doesn’t work. In my spread sheet, I added brackets to either end of the cell text that’s supposed to be a list:

[item 1, item 2, item 3]

Try that and let me know if it doesn’t work.

Didn’t work for me… I’m having the same issue. If you don’t mind having a look and letting me/us know, that would be much appreciated, as it’s driving me crazy!

Ahhhhhh, found it… you have to add (to your excel sheet list) the brackets, but also the quotes to format properly in JSON format.

So, like this: [“item1”,“item2”,“items3”]

Hope that helps someone else out there.

3 Likes

Has anyone figured out a way to do that without editing the excel file? My users will be exporting a csv file that has lots of data that I don’t want them to have to alter. Is there a way to do it withing bubble so it does it for them?

yeah i have tried all combo’s and ziltch. Yes i am using open office. Please how do we upload list of things?

hey mike i tried all ways but still failed. could i get a screen shot or… yes it just refusing to recognize my listed field.

Just to be sure, you’re trying to upload a list of things and each new thing has a field that is also a list, right?

So here’s a recent set I uploaded. The “Ans List” is the field in Bubble that is a list of number answers, but these questions only have one acceptable answer. I used a formula to convert A, B, C, D to 1, 2, 3, 4, but that won’t show up when you export the spreadsheet as a CSV. The key to telling Bubble that it’s a list is the brackets. So even though each “Ans List” only has 1 item, the brackets tell bubble that it should still be thought of as a list.
image

1 Like

Hi Guys, i also have a problem with this plugin. Does anybody has some minutes to help me out?

Did anyone find a solution for this?
Unfortunately, I can’t have my users to add brackets to the sheets, it’s going to be a mess.

Hi, I had troubles too and manage to solve it with a patch on the plugin. I wrote to the author but had no answer. Here is what I sent him:

I managed to allow it on a temporary copy of the plugin by allowing to add “:List” (case non-sensitive) after the name of the fields we want to see as a list. At this point, each value must be separed by a “,” (maybe a property to allow changing it could be a good idea).

Here is what you need to change if you want them (in Elements tab), in update line 262, just after this:

    $(batchedData).each(function(){

add this:

        // need to convert the headers and data that are lists
        for (let i in header) {
            if (header[i].match(/:list$/i)) {
                header[i] = header[i].replace(/:list$/i, '');
                for (let j in this) {
                    if (this[j][i] && this[j][i].length > 0) {
                        this[j][i] = JSON.stringify(this[j][i].split(','));
                    } else {
                        this[i][j] = '[]';
                    }
                }
            }
        } 

Regards.