Survey 123 Report Template Error: Failed to parse/does not exist or cannot be found in current parsing scope.

24998
47
03-01-2019 03:47 PM
ChrisShuck
Occasional Contributor

I am trying to upload a report template to Survey123 however I keep getting the error  Failed to parse "${MT_Amount1} Field "${MT_Amount1}" does not exist or cannot be found in current parsing scope. 

I have checked the XLS spreadsheet in Connect to make sure that the tag matched exactly, and to my knowledge the opening and closing tags for the repeat is placed correctly as well

Is there an update that could be causing this? It was working fine a few weeks ago with the same tags and the same survey. 

0 Kudos
47 Replies
by Anonymous User
Not applicable

Thanks, I will take a look and get back to you soon. Phil.

0 Kudos
ZachPearo
Emerging Contributor

I figured it out Phil. Thank you! Not sure how it worked, but I switched “propertyname” to “ “landname” in the form and then in the template and created a new survey and it worked.

Zach Pearo

Conservation Easement Steward

Society for the Protection of NH Forests

54 Portsmouth St, Concord, NH 03301

zpearo@forestsociety.org

Office: 603.224.9945 x338

Cell: 603.400.2190

by Anonymous User
Not applicable

Hi Zach,

Thanks for letting me know, I have reached out to one of our website developers to check about the use of "propertyname" as a field name and if we would expect any issues in the feature report. It appears it could be causing an error when the report runs. Using a different name for that question would be the correct workaround for now.

Phil.

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi Zach,

Thanks for sharing the template with us.

Actually, the "propertyname" should work in the template. If you check the header of the second page in the report template, there's a placeholder ${propetyname} which has a typo (missing an "r"). The "propertyname" issue will be gone once you fix this typo.

Thanks,

Zhifang

0 Kudos
ZachPearo
Emerging Contributor

Of course it was that easy! I’ll keep it the way I have it as it doesn’t make a difference at this point. Thank you for notifying me of this though, it’s nice to know that I’m not crazy, just bad at spelling.

0 Kudos
Peters_Amy
Regular Contributor

James,

I am getting this error when trying to run a custom feature report from a hosted AGOL survey and I'm officially stumped:  Failed to parse ${ if[object Object]}

Attached is my template and my survey xls.  Thank you so much.

Tags (1)
0 Kudos
Peters_Amy
Regular Contributor

James was able to help me.  In order to check if there are answers in a repeat,  the syntax should have been:

${if (repeat1 | getValue: “count”)>0}

Thanks James!

0 Kudos
by Anonymous User
Not applicable

Hello,

 

I have been in the process of creating and fine tuning a series of custom reports for this year's survey season this week. I have noticed a change in something that I find important for the reporting process while using custom reports. I have found that now there is no opportunity to pull a value from a question that is located "outside" of the repeat.

 

Meaning, I have a survey that contains a question named "Unique_ID" to be used in documenting a "Unique ID" for the survey. I then have a repeat that contains a series of questions that pertain to sampling events that occur at this location. Within my custom report I was able to call the "Unique_ID" question into the repeat to be used within generating the "Unique ID" for each sampling event. However, it appears there is now a validation process that is running to check for all fields within the repeat prior to allowing the custom report to be uploaded. My repeat does not contain the "Unique_ID" question within it and I am receiving an error upon uploading the custom report. The error is "Error: Failed to parse "${QuestionNameOutsideRepeat}". Field "${QuestionNameOutsideRepeat}" does not exist or cannot be found in current parsing scope."

 

The only way for me to get around this is to add in a new question "Unique_ID_Temp" into the repeat and pass the value from the "Unique_ID" question outside of the repeat into this new field through a calculation. This is causing a bloat within my database as I was able to use fields outside of the repeat, but now I have to create temp fields to house this information. I use to call multiple fields such as the Unique ID, Latitude, Longitude, and a few others into the repeat for use in reporting efforts, but that is no longer available.

 

I am using the ${RepeatName} ${/RepeatName} tags within my custom report to access all of the related records for the primary survey.

 

Are there any other workarounds for this? Any insight would be greatly appreciated.

 

Thank you,

Mike

0 Kudos
ZachPearo
Emerging Contributor

Can you post your word template document and excel form like I did above? Esri staff may ask you to do this as well so I may be saving you a bit of time. 

0 Kudos
by Anonymous User
Not applicable

Hey Zach, I have been through both with a fine tooth comb and I know it is not due to a miss-spelling and I can confirm that this field is not found within the actual "repeat" (related table) for the survey. So, I think what I might try is something that James referenced above about being able to reference questions from the parent survey into the repeat.

James stated: "This was a bug discovered late in release testing, related to an enhancement introduced to specify a field by using <tablename>.<fieldname> (this was introduced to enable referencing a field in the parent table inside a repeat section).  We will be addressing this issue in the near future."

I am going to give this a try first to see if this works, but thank you for the tips.