Database "List of texts" logic

Hello, this is not the first time I have encountered this issue so I decided to ask about it, whether it is a bug, or I’m using it wrong.

Let’s say we have such data type in our database
Both ‘vote’ and ‘voter’ being lists.

https://i.imgur.com/rdnjgve.png

The strange thing that I have encountered is that list can only hold unique elements.

Also, if you would try adding an empty entry - it would simply not be added, and what I would expect is for an empty field to be added as , ar a null.

I just ran a few quick tests to confirm your findings and it does appear to be an inconsistency in the way Bubble is handling lists. I confirmed what you demonstrated in your video is accurate.

However, this is apparently Bubble’s intention. The lists are capable of handling duplicate entries (you can confirm this by adding duplicates directly to the list in the backend data editor). You can also add duplicates using the “Add List” method, but only in certain use cases it seems. I’m sure this has been discussed in great length elsewhere. Here is a place to start if you are interested: List, add duplicate values - #2 by mishav

As far as an empty entry, I would expect the list not to hold empty values, that doesn’t really make sense. If for some reason you had a really good reason to do this (and I can’t imagine anyone would) you could add a space or type a value yourself (e.g. NULL) and then filter those out on your display.

What you are showing however is poor data type design. You really should keep a list of votes in a different table along with the user who voted (e.g. DateType: Votes - vote | voter (1 | userA, 2 | userA,3 | userB). rather than storing them in two lists on one table.

Further, lists have a limit of 10,000 records presently. Unless you are building a very small application, or you have a predetermined limit on the number of items and you don’t need duplicates, I wouldn’t rely on lists for data storage.