Cannot change object as it is empty

0
In my native app, a dataview gets an object from a nanoflow. I get this error when I access the page.  “An error occurred while executing nanoflow data source for widget NativeMobile.Questionnaire.dataView2: Cannot change $MyQuestion as it is empty”.
asked
2 answers
0

The first activity in your nanoflow retrieves a list. That list is empty. If you debug your nanoflow (9.0.5, so that is possible) you will be able to see that.

The second activity tries to take the head of you list, so logically it is empty

The third activity is throwing the error since it cannot change an attribute of an empty object.

So you need to make sure your Retrieve-activity returns at least one object.

answered
0

Adding to  Tim van Steenbergen  answer 

To avoid or handle this scenario, try to do an empty check on the list after retrieve of the list with the decision activity you can show some error or feedback message if it is empty. if not you continue with the subsequent head and change activity.

 

answered