# Lists Are Actually Broken!

**URL:** <https://forum.electra.one/t/lists-are-actually-broken/1544>\
**Category:** Bug reports\
**Created:** [June 5, 2022, 10:17am UTC](https://forum.electra.one/t/lists-are-actually-broken/1544 "2022-06-05T10:17:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 5, 2022, 10:17am UTC](https://forum.electra.one/t/lists-are-actually-broken/1544/1 "2022-06-05T10:17:04Z")

</div>

I already reported a bug

[Wrong Values Sent on “Send Current”](https://forum.electra.one/t/wrong-values-sent-on-send-current/1532/5)

But the issue is with the list control itself.  
The user function receives value of the INDEX of the list. And we cannot access the Message Value because the user function is called before setting the value internally.

See the following example:

index - Label - MidiValue  
0 - Option A - 0  
1 - Option B - 10  
2 - Option C - 20

Default Value: 0

I turn the pot slowly to the right:

```auto
10959888 lua: ValueFromMessage: 0 Value from function:0.0 
10962298 lua: ValueFromMessage: 0 Value from function:1.0 
10964898 lua: ValueFromMessage: 10 Value from function:2.0
10967098 lua: ValueFromMessage: 20 Value from function:2.0

```

You can see it returns ValueFromMessage is the previous value. So we have no way to access those values from a LUA script.

If Im doing something wrong, please let me know!

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [June 5, 2022, 10:37am UTC](https://forum.electra.one/t/lists-are-actually-broken/1544/2 "2022-06-05T10:37:12Z")

</div>

You’re not doing anything wrong. I’ve reported the same issue as well already.  
The message value indeed lags one behind. I can’t remember my own work around, but check if you are able to trigger the message a second time somehow, to get to the expected value

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 5, 2022, 10:42am UTC](https://forum.electra.one/t/lists-are-actually-broken/1544/3 "2022-06-05T10:42:55Z")

</div>

I tried many things but none worked. This one is really a bummer!

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [June 13, 2022, 6:42pm UTC](https://forum.electra.one/t/lists-are-actually-broken/1544/4 "2022-06-13T18:42:08Z")

</div>

Fixed in the 3.0 testing branch. The Lua values should be 100% in sync with the message values.

```auto
1494007 lua: valueFromMessage 0 functionValue : 0.0
1494887 lua: valueFromMessage 10 functionValue : 1.0
1495217 lua: valueFromMessage 20 functionValue : 2.0

```

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 13, 2022, 6:48pm UTC](https://forum.electra.one/t/lists-are-actually-broken/1544/5 "2022-06-13T18:48:24Z")

</div>

Thanks! This will make them usable at last!
