Survey123 - Report Template Error

1561
5
02-26-2019 05:52 PM
JenniferMcKee__GISP
New Contributor II

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.

  • In my customized report template I have the question formatted as:
  1. Has the jurisdiction pre-identified and documented staging areas and points of distribution (POD) locations for receiving and distributing resources?

${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}

  • In the the downloadable template from survey123 the fields are shown as:

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}

  • I'm also getting an error "Error occurred when rendering by the report engine. Failed to parse "${LCAR__2019.ADMIN_FIN40|selected:"100"}".

               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}
    • ${ADMIN_FIN40 | selected:"value of a choice item"} is used for putting a check box beside a choice item.
    • Input:

      ${ADMIN_FIN40 | selected:"100"} 100%

      ${ADMIN_FIN40 | selected:"75"} 75%

      ${ADMIN_FIN40 | selected:"50"} 50%

      ${ADMIN_FIN40 | selected:"25"} 25%

      ${ADMIN_FIN40 | selected:"10"} 10%

            The field has a field length constraint of 3 and has a field type of esriFieldTypeSmallInteger

Any help would be appreciated..

0 Kudos
5 Replies
Jim-Moore
Esri Regular Contributor

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

0 Kudos
JenniferMcKee__GISP
New Contributor II

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.

0 Kudos
Jim-Moore
Esri Regular Contributor

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

0 Kudos
Jim-Moore
Esri Regular Contributor

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

Jim-Moore
Esri Regular Contributor

Hi Jennifer McKee, GISP

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

0 Kudos