Add Item that is already in the list

Dear Community!

I have a Users database with a list called “bets”. I need to store some values there that could be repeating. For instance, [100, 100, 100, 200, 100, 100]. I cannot do that using “make changes” and “add” as it is “If the item is already in the list, it will not be added.”. Which is kinda strange.

Any suggestion on how to handle it?

Best,
Dima

Hi there, @zifiry… check out this thread and the thread that is linked within it.

I think those threads should help you get down a good path.

Best…
Mike

1 Like

Thank you, Mike! I’ve read all the stuff.

It is awful that such an easy task should be solved in such a complex way. I’ll try to come up with another solution.

Best,
Dima

Well, without knowing anything about your app, I would think you would want bets to be things that are stored in their own data type. If that was the case, there would be no issue with having “duplicate” bets in a list because each bet is a unique thing in the data type.

Let me please describe the task a bit in detail. Each user in the application place some bets/stakes on the events (like sports betting). In the user’s profile, these bets should be displayed according to the event.

If I implement your solution (storing information in the new data type) means that each user will put his info in this new datatype what is a bit dangerous in a long way. I want to somehow store their bets in users’ corresponding row in the Users database.

Just made it using your instructions here:

Thanks again, Mike! Keep up the great work!

1 Like