Get/got problem

Why i got only last value of list

You will iterate over the whole list.

Try adding a break block after adding item to list, that might stop the iteration.

1 Like

I gave a simplified example, but there are actually more activities. There is no repetition of the Gotvalue procedure and it does not allow a fraction block to be placed there. This is the only place he let it put (after external repetition) and it doesn't help.
I go through the list "PAKKUMISED", getting each item for "get tag". Below them in the CloudDB are numbers indicating their weight, based on which I try to rank them in a "sequence" list.

Your global variable MOISTE is reset to each tag as you fire off each CloudDB GetValue request like a machine gun into the air.

By the time you take your finger off the trigger, global MOISTE has that last tag in it, but the bullets have not started to fall to the ground.
(The CloudDB GotValue events have not yet started to be returned from the CloudDB server)

To fix this, you need to slow down your machine gun to one bullet at a time, firing the next bullet only after the previous bullet hits something.
Keep a dictionary to catch each tag/value as a key/value.
Keep a global list for the TagList, and deplete it as you fire off requests.

1 Like

I understood the problem, but not the solution. Should I somehow use a dictionary instead of a list.

The break block change is only that if before gave only the last, then now gives only the first.

It depends.

I don't know what you are storing because I don't understand the variable names.