Issue with empty list in list view

Hello,   I am currently working on Mendix 9.24.3. In my project I have a list view with microflow as source. The microflow returns a list of a specific variable that can possibly be empty. I added a ‘decision’ block to test whether it is empty or not. In the first case, I return an empty list of this variable and in the latter I return the no empty list containing all the returned variables.  When the list is empty, I have this error :  An error occurred while executing microflow data source for widget <the name of the listView>: Cannot set properties of undefined (setting 'hash')  I also have this error in an other dataview.   Do you have any idea how I could solve this ? Thank you !
1 answers

Hey Sofian,


Is it possible to test this with a breakpoint?


Depending on the size of the list you're retreiving, this is what I would do: use my data source flow first as a subflow to return a boolean (isListEmpty) in a helper object and show an alternative message for users. If it's not empty, then I call the data source flow a second time to show the contents of the list.


Good luck with the error!