mapSettings method in feature reports - what changed?

413
8
10-08-2021 08:28 AM
SFM_TravisBott
Occasional Contributor

I have a feature report template, an element of which renders a basic map of the polygon record in question. The report generated just fine as recently as July. The season has calmed down, I'm back to run reports and I get an error message that says mapSettings is no longer supported. 

Below is a screenshot of the report template.

ReportTemplate1.PNG

Below is the result that it produced just fine in July...

ReportTemplate3.PNG

And this is the error that's cropping up now when I try to run the report....

ReportTemplate2.PNG

 

mapSettings is still listed as available in the documentation for the feature reports, and lists it as still being valid for the geoshape field. Below is the format for the geometry field in Survey123 Connect.

ReportTemplate4.PNG

So......what gives? Any help would be greatly appreciated, as nothing has changed on our end for how reports were run, and we made a few hundred of these earlier in the summer. 

0 Kudos
8 Replies
MatthewCarey
New Contributor III

Hi, I got the same error last week, and the solution to this question helped me fix it:

https://community.esri.com/t5/arcgis-survey123-questions/s123-error-occurred-while-generating-report... 

The binding for my geopoint field was incorrect in my survey design (which didn't cause a problem a few months ago). Once I fixed it and republished the survey, the error went away.

Hope this might help. 

 

 

0 Kudos
SFM_TravisBott
Occasional Contributor

@MatthewCarey Thanks for the link. 

Can you elaborate on what fixed your issue? I am finding documentation on field types in this context to be scant. 

Mine is configured as such:

ReportTemplate5.PNG

The cases I've seen have expressed issues with field type being incorrect (like the link you sent) or the value being null or needing to be null. Having trouble imagining what my bind type should be other than what it is. 

0 Kudos
MatthewCarey
New Contributor III

My fix was to make that cell in column U in the xlsform blank. I didn't change it to null or anything, I just made it empty, and then republished the survey. It seemed to fix the error, but to be honest I don't know if it's considered good practice.

Interestingly, I don't see esriFieldTypePolygonZ in the dropdown list I would use in that cell, but maybe that doesn't matter.

0 Kudos
SFM_TravisBott
Occasional Contributor

Thanks for that. That did the trick, sort of. I was at least able to produce the report. 

I'm using 3.12 and still have that as an option...

ReportTemplate6.PNG

Interesting though is that it no longer seems to pull from the appropriate map. I specify the item id for the map in question, but it seems to pull from the map embedded in the report window. 

The image it pulls now....

ReportTemplate7.PNG

And the specified web map, which the reports used to pull from pre-update....

ReportTemplate8.PNG

Maybe time to page @ZhifangWang, as they responded in the linked post, and may be familiar with the changes that have undermined things. 

 

0 Kudos
DerrickWestoby
Occasional Contributor II

Regarding the display of the map (not the error preventing report generation, which it looks like you solved) - the last survey123 update changed the way features render in your map geoshape and geotrace features (areas and lines) used to display in your map according to the visualization settings you had applied in the feature layer. This changed in the last update to a generic symbology display as the default. Theres a flag you can add to your {geoshape} call in the feature report to respect the symbology as set in your referenced map that you're calling by item ID.  sorry I don't have that handy for you right now, but its in the last survey123 blog post (within the last month).  Add that flag in your feature report and your polygons will use the same symbology you have set in the map being called by itemID. 

0 Kudos
SFM_TravisBott
Occasional Contributor

@DerrickWestoby Thank you for the reply. I will try to investigate that. 

If I only had to follow one element of Esri's platform it would be a lot easier to hang on every blog post/update, but that's just not how it is. It's a constant pain to have your workflows eroded out from under you just because. 

0 Kudos
DerrickWestoby
Occasional Contributor II

All I can do with you on that one is commiserate.  I agree it's tough watching for the rug to be swept out from under you all the time.  I've gotten into the habit of spending ~1 hour per week at work going through all of the release notes and blogs of all of the software I use at work (Normally my Monday mornings, which is why I'm here right now...)

 

Anyways, I'm back in the office and here's a copy & paste from my updated templates.  The "currentLayer" tag here is the new one I was describing:
${image_location | drawingInfo:"currentLayer"| mapSettings:" b2519fd7a45647a0946f50b0535b6ddd":36000| size:175:250:0:0}

I can't even find the blog post that this was first mentioned in, but I see that it's been added to the help doc for the report template:
https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm

-----------------------------------------------------------------------

If your survey doesn't contain a map question or you're creating reports for feature layers without an associated survey, the geometry of a question can still be returned using the ${$shape} placeholder.

By default, a map question will display using a default map symbol, regardless of symbology set in the feature layer. You can use the drawingInfo method to extract and use the drawing information stored in a specific feature layer, including the symbol, label, and transparency used. You can specify this information either from the current layer or from a specific feature layer through a provided URL.

${location | drawingInfo:"currentLayer"}

${location | drawingInfo:"https://.../FeatureServer/0"}

If your survey doesn't contain a map question or you're creating reports for feature layers without an associated survey, the geometry of a record can still be returned using the ${$shape} placeholder.

------------------------------------------------------------------------------

And I can confirm that it works for points and area features.  In the web map being called, my point features will display a radar box/arrow icon (that's hosted elsewhere) based on the viewing direction if it's available. If not, a blue circle will be displayed.   Started working perfectly as soon as I put that flag in there to use current layer from the web map. 

DerrickWestoby_0-1634571185950.png

 

0 Kudos
SFM_TravisBott
Occasional Contributor

Thank you, Derrick! Very helpful. I appreciate it. 

0 Kudos