Cannot read property of undefined (reading list)
Question
Application Type
Reactive

Hi Community,

I'm working on a reactive web application where there is a dropdown, I'm using for fetching list of records. But while page loading, I'm getting this error.  

It is supposed to load the list with records while page load. But the data is empty. 

Hope you understand the issue. Any help will be appreciated. 

Thanks 

Prince

Solution

This error clearly tells that some is not initlize on screen loading. So you need to check variable which is not getting define properly. From above screen shot its not clear that its issue of dropdown or list. So you need to check it with some static values or try to initlize at some other place for a try like in oninitlize() onReady() etc.

If you can share oml for this screen only then also it will be helpful to troubleshoot this issue.

Hi @Prince K

Kindly attach oml file to understand the issue better and investigate.

Refer if required  https://www.outsystems.com/forums/discussion/74155/cannot-read-properties-of-undefined-reading-then/


Thanks, Aadhavan S

Thanks for the reply. AS

Sorry But I can't attach the OML file. 

Fine Prince. I think there is an exception while initializing the object.

As per OS best practice, try to fix all the warnings of the screen. hope this will fix your issue.

Thanks, Aadhavan S

Solution

This error clearly tells that some is not initlize on screen loading. So you need to check variable which is not getting define properly. From above screen shot its not clear that its issue of dropdown or list. So you need to check it with some static values or try to initlize at some other place for a try like in oninitlize() onReady() etc.

If you can share oml for this screen only then also it will be helpful to troubleshoot this issue.

Hello Prince, 

The error is quite clear, it means that the application wants to display something that is not yet available. 

One solution can be to wrap the dropdown in an IF statement with the IsDataFetched property of your aggregate, in this scenario the dropdown should only appear once the data is fetched.

Hope it helps!

Paulo Rosário

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.