Issues with getting values from List Box Widget

I am using a List Box widget with an advanced query as the record source. This has a select2 attached to it.


It reacts as expected except when I try to save the records. In the debugger it shows the list inside the widget as an empty list.

When I tried to use this in another application i was able to retrieve the data from there. The only diference I can see is that the other application the list box was inside the main page, while this one is inside a webblock that is called inside a modal.

What am I doing wrong? Thanks for the help!

Hello Lara,

This seems a "debug visualization" issue due optimization.
Are you effectively using this list in the action?
If not, they will be optimized and the values will not be available...


Hi Edu,

At that point of the screenshot I am already iterating through the list...

Hi Lara,

I just made a small test application with what seems your configuration.
Could you take a look and see what is different?


Only thing i see diferent is the fact that i'm using an advance query instead of an aggregate, but i have already tried creating a local variable with a structure to save the info that the query returns and using that to feed the list box. And the issue persists...

Edit: I also have an If inside the modal and this block exists in one of the branches. So it won't be loaded at page load like your, right?


Hi Lara,

I could reproduce the problem.
It seems that on Ajax Refresh, the list itself does not go to the Viewstate. So, when you hit the Screen Action, the list is not there.

I solved the issue with a small trick.
I add a local variable with the same type of the aggregate/sql output list, use an assign to this local list to be a reference to the aggregate/sql output list and use the local list instead of the aggregate/sql list as source to the List Box.

Now the items go to the Viewstate and everything works.

Hope this helps.



Thanks Eduardo!