Subscribe data update sometimes not working?

Hi guys

I have this list that i update everytime i put a new document in DB, and for the most of the time it works fine, but occasionally, the latest added document, which is just a number, doesn’t show on my list, and if i add another document after that, that one will show.

So basically, if i click my button on the top of the page 3 times, it will store 1,2,3 as 3 different documents in DB, and the list should update accordingly, but some of the numbers are not showing.

Any idea why this happens? Thanks in advance for any answer :slight_smile:

Without seeing your code it’s impossible to answer.

1 Like

Hey robfallow thanks for reply, it turns out that when building the list, i use the numbers themselves as the keys, and what i’m generating here is just random numbers between 1-10, and the list won’t display items with same key value: say the first time i press the button it generates 8, the list displays 8, and if the 5th time i press the button it generates 8 again, it will be added to the database, but won’t be showing up in the list because it has the same key, which is 8, as the first 8 i generated.