Content in a ListView is undefined


When I try to recover all the objects of my list, I succeed to get the right number of elements, but, below, all the fields of each element are "undefined", preventing me to recover and manipulate their content. Do you have any idea why?

Hi @Dymalle, I'm having trouble reproducing this issue. Do you mind sharing a JSON export of your application? Feel free to DM me!

Exporting will not include any query data or resources, only the components and source code.

It seems to be the same issue as this one : Forms in ListView shown undefined
Which has no answer yet.

Hey @Dymalle! Would you mind sharing what components you're using in your listview and what you're trying to do with them? Specifically, where are you looking to use messageListView.data?

As Alexi mentioned, an app export would also be super helpful!

Hello @Kabirdas,

I already share the export with Alexi in a private message.

Ah found it, thank you! Are you trying to access the values of the text components inside the messageContainerOther component in your List View?

Each component that's nested in a list can be indexed in order to access its value, so you should be able to access the data with something like:

const listviewValues = _.range(listView1.instances).map((i) => ({
  text1: text1[i].value,
  text2: text2[i].value,
}));
return listviewValues;

or

const listviewValues = [];
for (let i in listView1.data) {
  listviewValues.push({ text1: text1[i].value, text2: text2[i].value });
}
return listviewValues;

Does that work?

Thank you @Kabirdas,
I won't have time to work on this before a week.
I'll have a look in a week.