Adding value to retrieved list from CloudDB deletes the previous values from the list and new value is overriden

Hello Community,

I am using CloudDB to store values in a ListView. These values are provided in the TextBox, and are added added to the ListView when 'Add' Button is clicked. When I reinitiate the screen, the existing values stored in the ListView are displayed. But when I 'Add' a new value through the TextBox using the 'Add' Button, it overrides the existing values.

I will really appreciate your help here.

What do you want? you want the new value need to append with the existing value?

How many people are doing this add operation at the same time?

Is each person grabbing their own copy of the list, then replacing it regardless of what other people did in the meantime?

(Canned Reply: ABG - Download those blocks and post them here)

Please download and post each of those event block(s)/procedures here ...
P.S. These blocks can be dragged directly into your Blocks Editor workspace.

See

for how to download individual draggable block images.

Yes.

CloudDB has a way to store a list, where you can add items at one end and remove items only from the other end.

It's tricky, and suitable for piling up +/- changes to accounts, without having to grab the whole list to add something to the list.

You would have to summarize the list by account.

Further advice requires you to say what you are keeping on the list.

Hi ABG,
Here is a screenshot of the add button code through which I am adding items to the list.

I am trying to create one list where 2 people can add items which should reflect for both. When a person deletes/updates an item, it should reflect for the other person too. Both should be able to add items individually to the same list. The delete and update options are working. The items in the list are added, when the session is reinitiated, the existing list displays, but when a new item is added, the previous list disappears :frowning:

This thread shows how to do multiple user updates to a common shared list. Adapt it to CloudDB.

Also, you can't init a global variable with another global variable.

More mistakes in the blocks...

Don't use text empty tests on lists. Only use Is List Empty tests on lists.

An empty list becomes '[ ]' when you try to squeeze it through a text block. The '[' and ']' characters are not blank, so an empty list will never pass a text empty test

Also, what if ten people want appointments?

Would you have ten global lists?

No.

Your app can't see into the other users' apps' global variables.

It's only able to grab and quickly replace that common tag/value in CloudDB.

Further thoughts...

You can avoid using cloud based lists for an appointment app by imposing restrictions on appointment times, say 15 minutes, and you combine doctor names with appointment times for tags. Then the corresponding value would be the name of the one patient that the doctor would see at that time.

Tag: DrHu/2025.05.02.0830-0845
Value: ABG

This is as simple as it gets:

(post deleted by author)

Adding value to retrieved list from CloudDB deletes the previous values from the list and new value is overriden - #13 by TIMAI2 has the best solution for this.

Yours was updating a global list when data arrived, but not updating your list view elements list.

P.S. global variables make it worse for this type of app.