Survey123 Report Template Error: Failed to parse cannot be found in the current parsing scope

07-18-2022 09:40 AM
New Contributor

Attempting to weed through errors and upload a report template to Survey123, however I keep getting the error: Failed to parse ${OtherM | selected:"yes"} since OtherM cannot be found in the current parsing scope.

I'm fairly new to Survey123 and could really use some help figuring out what's going on and maybe some tips to avoid so many errors in the first place. From what I can see, the XLS spreadsheet and Word Doc seem to match up but when I delete the line entirely, another error comes up for the line above. It's really got my head spinning.

I'll include the files I'm working with to better display the issues I'm coming across and would greatly appreciate any and all help!

0 Kudos
1 Reply
Esri Contributor

Hi @TRamos ,

Thanks for sharing here! I have examed your form and template, and I think there are 3 issues:

  1. The "begin repeat" type was written as "begin_repeat" in the XLSForm. Although this may not lead to a report issue, it is better to write the question type using the correct syntax.

  2. The repeat's open tag is written outside the table and the close tag is inside a table. This is problematic to the report service since the report service does not know how to deal with repeat instances. If the open/close tags are written outside the table, the repeat service will duplicate the entire section between the open/close tags for each repeat instance. If the open/close tags are written inside the table, the report service will duplicate the table rows for each repeat instance. I move the close tag outside of the table to fix the issue, see screenshot below. With this fixed, you will not see the error raised for OtherM which is the question before entering repeat.

  3. There are many fields in the report template that are not actually in the XLSForm, such as Inlet_641. All of them are removed in the updated template.

Original template


Updated template


With these 3 issues fixed, your report should be generated correctly. Other than that, you may also need to place the open and close tags if outside the table.


Please feel free to reply to this post if you encounter other errors.



0 Kudos