List Variable always show size of 1


#1

1) Give a description of the problem
I have a list variable and no matter what I put in it, it shows a length of either 0 or 1. 0 when empty, 1 when something is in it.

2) What is the expected behavior?
The size(), count() functions would give me how many items are in the list.

3) What is happening/not happening?
It shows a length of either 0 or 1. 0 when empty, 1 when something is in it. Below is how I am testing this.

image

Basically when I try to sum the array

image

The total is always the value of the first item.

Full piston, the log at the end is only there to debug this issue.


#2

Don’t quote me on this but I thought I read somewhere that there was an issue when the key is a number? Not sure where I read it, so the suggestion was to use one:value, two:value etc… I may be imagining it too :slight_smile:


#3

hmm… I try that, but the problem is the values are stored programmatically.