Select to view content in your preferred language

Survey123 Report Error - Cannot read properties of undefined (reading 'name')

737
3
08-23-2023 02:55 AM
AnthonyJonesRSK
Occasional Contributor II

Hi,

I'm trying to run a report for a particular record in a Survey123 survey and am receiving the error below:

"An error occurred when rendering by the report engine. An error occurred when assembling data. Error message: Cannot read properties of undefined (reading 'name') The expression leads to this error: ${# IssueVisits|resultRecordCount:1|orderByFields:" OBJECTID DESC"}"

This report works fine for other records but appears to have an issue with one in particular. I'm not quite sure what "undefined (reading 'name')" is referring to so any help with that would be much appreciated. It appears to have a problem with some nested repeat sections in the report , that start with ${# IssueVisits...}. I have removed these and the report runs so could do with some help understanding what the issue is with this section for this particular record.

I have also done some further testing and built a test survey on top of the repeat above the nested repeat and then ran a report where each record in the repeat is a survey entry. Here the same syntax for ${# IssueVisits...} is used and it appears to work fine so not quite sure what the problem is.

Any help on this would be much appreciated.

Thanks

Anthony

3 Replies
AnthonyJonesRSK
Occasional Contributor II

Some further investigation into this and I think I've narrowed down the issue to the orderByFields part of my nested repeat syntax. It doesn't appear to like the use of the OBJECTID field for ordering my records. If I use a different field for ordering then the report for this record appears to work. I'm using the OBJECTID field so I can pull the latest record from the nested repeat. If someone could look into this it would be very much appreciated.

Thanks

Anthony

 

lhendricks
New Contributor II

Hi @AnthonyJonesRSK, were you ever able to solve this issue? I am encountering the same error for a particular survey/feature layer, but it happens regardless of which records are selected and whether or not I am using orderByFields. 

Thanks! 

0 Kudos
AnthonyJonesRSK
Occasional Contributor II

Hi @lhendricks,

Unfortunately I never got a concrete resolution to this as I raised a case with Esri, we went over it on a Teams call and typically the issue didn't reoccur on the call. For me it seemed to be a bit sporadic so I don't know if there was a particular record causing issues. I've not had to run the report for that particular project again so haven't seen the issue since.  Sorry that's not much use to you so may be worth raising your own ticket if it is something that is happening consistently. If you do get a resolution, if you could share it here it would be much appreciated as I'm sure it will cause me issues again in the future!

Thanks

Anthony

0 Kudos