Creating a list with duplicate items

Hi ,

Continuing the discussion from Same Name & Number of list is not updating:

I tried the solution in that ticket thread and created another database but it did not work. It is still not creating the duplicated items…

Any work around on this ?

I have 0 and 1 values each time.
so my list is going to be (0,1,1,0,0… )


Hi there, @serbestanil… you can try this workaround for adding duplicate items to a custom state list.

If you tried to do what I showed in the linked post and it didn’t work, share some screenshots of your setup because it should have worked given that duplicates are not duplicates when they are unique things in a data type.


1 Like

Or just use a component that DOES support duplicate values, like the Custom List state in List Shifter, the Floppy’s RAM List state in Floppy, or one of the Aux List states in Polyhedra.

(An Aux List state in Polyhedra would actually be the lowest-overhead route as that element is quite small codewise. Those states are only numeric, but it seems like the list you’re constructing is numeric, so would work. You can append or prepend list values using Polyhedra’s Set/Mod Aux List action and select from any of 30 predefined numeric states.)

List Shifter is more flexible, supporting nearly any data type, and I described to another user how to use it for this sort of list construction earlier today here:

Floppy’s RAM List is even more flexible, but somewhat overkill for this specific task (though that plugin and its siblings have many many other features and applications.

1 Like

Hey @mikeloc

I created an additional database which is called user changes.
I also have user database.

However, In your solution, it does not save the changes to user database.

any advice?

Your setup appears to be incorrect. The guest no. field on the User data type is apparently a list of numbers instead of being a list of things from the User Change data type. So, you are trying to add duplicate numbers to a list of numbers, and as you already know, Bubble won’t let you do that.

You can fix what I described above by deleting the current guest no. field on the User data type, create a new guest no. field that links to the User Change data type, and make the field a list. Then, in your last screenshot, add only the result of step 1 (not the result of step 1’s guest no.) to the list.

1 Like

@mikeloc Yes it works !! I did not know that relation on DB’s is exist.
It seems this solution is consuming DB a lot and it might a headache in case site gets more data in it.

Do you know any other work around which does not require a new db creation? I watched your video today but not sure if that is the solution which can be applicable in my case.

Hey @keith , It is my 4th date in my bubble app. It was a bit confusing to set up your modules. It downloaded one but I did not see any actions. It would be perfect if you prepare demo site or instructions guide. Fyi

You’ll find extensive docs in the plugins themselves and even more extensive docs in the relevant forum threads for each (except for Polyhedra, which is new and I haven’t done a video about as yet).