I am developing a Survey123 report template and I am getting the following error [Error: Failed to parse "${RMMAL27_Y_type}". Field "${RMMAL27_Y_type}" does not exist or cannot be found in current parsing scope."].
The field exists in my data and I am copying it straight from the provided examples of how to work with the field for a report template.
${RMMAL27 | selected:"y"} Yes
${#RMMAL27_Y}
${RMMAL27_Y_type}
Type Location Name: ${RMMAL27_Y_name}
Type Location Address: ${RMMAL27_Y_address}, ${RMMAL27_Y_city}, ${RMMAL27_Y_zip_}
${/RMMAL27_Y}
${RMMAL27 | selected:"n"} No
${RMMAL27_N | selected:"no"} No assistance needed.
${RMMAL27_N | selected:"assist"} The jurisdiction needs technical assistance to develop this plan/protocol and identify staging area and POD locations.
Staging Location Notes: ${RMMAL27_N_notes_stage}
POD Location Notes: ${RMMAL27_N_notes_pod}
Staging and POD Locations (at least 1 of each)
${#RMMAL27_Y}
Please select the type of location
${RMMAL27_Y_type}
Staging & POD Location- Locality
${RMMAL_27_locality}
Type Location Name
${RMMAL27_Y_name}
Type Location Street Address
${RMMAL27_Y_address}
Type Location City
${RMMAL27_Y_city}
Type Location Zip Code
${RMMAL27_Y_zip_}
Please select the location on the map
${RMMAL27_Y_geopoint}
---------------------------------------------------------------------------------------------
${/RMMAL27_Y}
But the following field name codes are shown in the options to work with fields
40. What percentage of time does the Coordinator of Emergency Management and/or staff spend devoted to your emergency management program? | ${ADMIN_FIN40} |
|
The field has a field length constraint of 3 and has a field type of esriFieldTypeSmallInteger
Any help would be appreciated..
Hi Jennifer
Thanks for the error messages and details. This looks like it's being caused by a known issue where a report template will not generate if a field name inside a repeat contains the repeat name. In this case the string 'RMMAL27_Y' is in the name of the repeat and also in the names of the questions inside it. We are working on a hotfix for the website which should be released soon. Please see more discussion on this here (including a workaround).
For your second query, it looks like the integer field type could be causing the error. If possible, could you please share the XLSForm and report template for your survey so I can investigate?
Thanks & regards,
Jim
Thank you. I have attached the form to the original post. I ended up taking a different approach with the report as a work around
Selected percentage: ${ADMIN_FIN40}
but I would prefer using the previous method if possible.
Hi Jennifer
Thanks for the XLSForm. Confirming the integer field type is causing the issue. If I clear the bind::esri:fieldType column and re-publish, the ADMIN_FIN40 field defaults to string field type and the check-boxes in the report work as expected. I will check with my colleague for some further information about the template syntax. In the meantime, if you need this value to be stored as an integer one workaround would be to add a hidden field with integer field type and use the int() function in the calculation to convert the ADMIN_FIN40 response to an integer, e.g. int(${ADMIN_FIN40}).
Best regards,
Jim
Hi Jennifer, confirming we've logged the issue with the ${field1 | selected:"1"} feature report parameter, and this will hopefully be addressed in an upcoming release. I'll keep this thread posted with any updates.
Thanks & regards,
Jim
Just an update - this issue has been resolved for the next release of Survey123. Stay tuned to GeoNet for a release announcement. Thanks again for reporting it!
Best,
Jim