Integrate image-attachement in ArcGIS Survey123 report error 10.8.1

02-19-2021 08:32 AM
Esri Contributor


We’re using ArcGIS Enterprise 10.8.1, and we’re trying to generate Survey123 reports using the web interface.

Our surveys are published using Connect, and are based on feature services published through ArcGIS Pro. Our data is stored in a sde postgreSQL database.

We have enabled the attachments on the feature class before publishing the feature service.

When we try to generate a survey123 report, the attachments are not visible in the report. We are aware that this was a limitation with ArcGIS Enterprise, according to the documentation here

But, according to another documentation, it should now be possible with ArcGIS Enterprise 10.8.1

“If you are using ArcGIS Enterprise 10.8.1 or newer, as long as you do not use a feature service published from ArcMap, you can use images in your report template normally.”

The way we call the attachment to try to display it in the report is the one defined by the default report template generated automatically: ${​​​​attachmentquestionname | size:460:0}​​​​ with attachmentquestionname being the name of the question in the survey. This prints a blank in the report.

We have tried the following workaround :

${​​​​$file| size:460:0}​​​​

Which sort of worked. But, the issue is that this workaround will put all attachments together in the report. However, our users have several questions where they require attachments and they want to display those attachments in the report in a specific order.

Is the “normal” behaviour where you can call a specific attachment question in the report supported in 10.8.1 or do you have to use the workaround?

Nicolas and @AlexandreBONTEMPS1 

0 Kudos
4 Replies
Esri Frequent Contributor

Hi. The behavior you describe is expected for the following reason: Survey123 uses attachment keywords to uniquely categorize attachments. In this way, you can later decide where each attachment goes in your report.  10.8.1 is the first version of ArcGIS Enterprise that supports keyword attachments, and only for feature layers published by Survey123 Connect or by ArcGIS Pro.   If you captured photos in your feature layer prior to 10.8.1 or if your feature layer was published with ArcMap, the attachment keywords will be missing. 

For feature layers you publish with either Connect or ArcGIS Pro into 10.8.1, your new records will have attachments property categorized with keywords.

0 Kudos
New Contributor

Hi Ismael,
Thanks for your quick answer.

I read in the documentation that "the value listed in the name column (field name) is the keyword".

So if we have an attachment question in our report called "attach", we should be able to simply get the attachment in our report by using this: ${attach | size:460:0} right?

Because this prints a blank in our report.

Or maybe we're not understanding correctly how these keywords functionnality is working?

And to clarify: this is an entirely new feature service, published through ArcGIS Pro 2.6, data stored in postgresql, to a Portal 10.8.1. The attachment is added through Operations dashboard, where we embeded the survey

When I look at our survey data, on the survey123 website, if I inspect the attachment in my browser, I can see that the URL looks like this:

"<img _ngcontent-chy-c96="" class="ir ir-middle orientation-1" src="https://myportal/server/rest/services/portalfolder/NameOfMyFeatureService/FeatureServer/0/32/attachments/2?token=x" ng-reflect-ng-style="[object Object]">"

Shouldn't the info after the attachments/ be the keyword?


Thanks for your help

0 Kudos
Occasional Contributor II

I'm having this EXACT same problem. The only difference is my data is in SQL Server and I published the feature service with Pro 2.7. I see the attachments in the records in the Survey123 website, but the report is blank where the signature should be.  @IsmaelChivite do you know what's going on? 

0 Kudos
New Contributor

I am also having the exact same issue. Survey published through Connect (v. 3.11.123) to ArcGIS Enterprise 10.8.1. Data is in an Oracle SDE. Service published from Pro 2.7. All photos and attachments are new (none were collected prior to the setup I just mentioned). 

EDIT: I ran the upgrade attachments geoprocessing tool in ArcGIS Pro on the SDE datasets with attachments enabled, then restarted the service and republished the survey. All new attachments now appear in the reports as they should.

0 Kudos