Error when generating feature reports: Cannot read property 'value' of undefined.

978
6
03-04-2020 01:03 PM
KonradHughes
New Contributor II

After creating a custom report template in Survey123 and receiving no syntax errors, I attempt to run a sample report and get this error:

Error occurred when rendering by the report engine. Cannot read property 'value' of undefined

There is no 'value' field in my surveys, and strangely enough, I was able to actually generate a report several times before I began receiving this error. So I know that my templates work correctly. Why this error all of a sudden? Did I run into an issue on the Esri Cloud side?

I've attached the sample report that I got to generate correctly with my custom template, as well as the associated XLSX of the survey.

Tags (1)
0 Kudos
6 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Konrad,


Apologies for the delay.  This might be better diagnosed via Esri Support - aside from the form, there may also be something about the features or feature service as well.

0 Kudos
MattCreaney
Occasional Contributor

Hi.  I'm having this same issue with one of my templates.  There is no field called 'value', in fact the word does not exist on the report template at all.  I'm confident there is no issue with the template and this survey has a dozen or more similar templates associated with it that work correctly.  Syntax is fine on upload.

Konrad Hughes‌ did you get anywhere with this?

0 Kudos
MattCreaney
Occasional Contributor

Make that 2 templates, the second of which worked correctly the first instance it was used...

0 Kudos
EdmundHall
New Contributor III

Hey Matt Creaney‌,

I had a similar issue, and after receiving support from Esri Inc, it turns out the issue with my report template was that I had multiple image references on a single line. Separating them onto dedicated lines fixed the issue with that report template. 

Unfortunately I now have another report template which was working fine previously, and as far as I can see it's not the same issue as I've checked all images within the template, so I'm uncertain the above will help, but it is worth checking.

It is a little frustrating that the report templates will be parsed correctly when uploaded, but these issues still appear to be a syntax issue. This is compounded by the fact the error response given by the Survey123 website has no useful information to troubleshoot the cause of the error.

MattCreaney
Occasional Contributor

Hi @Edmund_Hall

Yes, with this particular issue it turns out that I had multiple image references on a single line.  I agree that the parser should detect this issue really and it should have been documented and easy to find.

Other issues I've had are the "" and “” together in the same template causes the same error.  Perhaps try this?

EdmundHall
New Contributor III

Matt Creaney

Thanks for your suggestion - that was exactly what was causing the issue. Hopefully other people find this post too!

 

Regards,

Ed

0 Kudos