Skip to content

Latest commit

 

History

History
133 lines (72 loc) · 7.2 KB

File metadata and controls

133 lines (72 loc) · 7.2 KB

Exporting Survey123 responses to Excel report (FMW)

Solution details

The zipped workspace or fmw file is a no-code solution to export attachments from a feature service to an Excel workbook. It reads all the features of a Survey123 feature layer using the AGOL Server Feature Service reader.

This solution is an enhancement of Use Case 1.

An organization and documentation feature called Bookmarks is used in this solution. This is a best practice pattern that you should use in your workspace. There's one Bookmark that contain an imroved version of Use Case 1. A second bookmark is added to complete the solution.

Below is a screenshot of the solution.

Alt text


Note

Prerequisites

  • A Survey123 feature service with image attachments. A sample feature service is publicly available for this blog. You are welcome to submit a survey.
  • An AGOL Organizational account. (optional-for services shared to Everyone)
  • Configure a Web Connection of your AGOL account in the Tools Options menu of the Workbench app. (optional-for services shared to Everyone)
  • Identify the destination folder for your attachments (e.g. c:\temp\jpeg)

Instructions

Bookmark 1

  1. Download and unzip the S123DITool_ExportSurveyToExcel.zip file from this repo folder and open the fmw file by double clicking the zipped file on your Doenloads folder. This will launch the Wokbench app and open the workspace.

  2. Copy the service URL from the Portal item by clicking on this portal item.

     a. Scroll down to layers and click on "Images and Annotations" link.
    
     ![Images and Annotations](image-1.png)
    
     b. The feature service item opens in a new browser. Scroll down to the bottom right of the page and copy the Service URL of the service.
    
     ![Service URL](image-2.png)
    
  3. On your canvass begin typing ArcGIS Server and select the ArcGIS Server Feature Service format reader.

  4. You will be prompted with the Add reader dialog.

     a. Click on Parameters, select the Web Connection that you created above. (Use None for authentication type if you're using the blog sample)
    
     b. Click on the ellipsis next to the Feature service textbox, then browse to your feature service, select your service and clck OK.
    
     c. Back to the Feature Service parameter dialog, click on Layers ellipsis and select your Survey123 form's feature layer.
    
     d. Click on Schema Attributes and select the Attributes to Expose as shown in the picture below.
    
     (Optional) Select Yes on the Resolve Domains drop-down if you used the Choice questions in your survey.
    
     e. Click Ok twice.
    

image

  1. Connect the Feature service feature type to the List Exploder. Once connected, you can delete the original feature type in your canvass.

  2. Now that the new feature type is on your canvass, we will configure it for our transformation.

     a. Click on the cog wheel of the feature type to open its properties dialog.
    
     b. On the Parameters tab, select Yes on the Include Attachments drop-down, as shown in the picture below.
    
     c. On the Format Attributes tab, check if all attributes that begin with arcgisonline_ are exposed. If you prefer, use the filter box at the bottom and Select All. 
    
     d. This feature type is now configured.
    

image

  1. We need the file path of each picture in the translation so we added the AttributeCreator for this purpose. Configure the AttributeCreator as shown.

AttributeCreator

  1. Since our file path is now an attribute, we can replace the target directory with the file path attribute created from Step 6. Configure the AttributeFileCreator as shown.

Alt text

  1. Now we're ready to build the Excel report.

Bookmark 2

  1. Configure AttributeManager as shown.

Alt text

  1. Configure AttributeManager_1 as shown.

AttributeManager_1

  1. Add the Excel format writer to your canvass.

     a. Click on Parameters, select the Web Connection that you created above. (Use None for authentication type if you're using the blog sample)
    
     b. Click on the ellipsis next to the Feature service textbox, then browse to your feature service, select your service and clck OK.
    
     c. Back to the Feature Service parameter dialog, click on Layers ellipsis and select your Survey123 form's feature layer.
    
     d. Click on Schema Attributes and select the Attributes to Expose as shown in the picture below.
    
     (Optional) Select Yes on the Resolve Domains drop-down if you used the Choice questions in your survey.
    
     e. Click Ok twice.
    

image

Requirements

  • ArcGIS Pro 3.1 or higher
  • Data Interoperability for ArcGIS Pro 3.1 or higher
  • Survey123 form used for the blog or you own service with collected data and attachments.

Resources

Below are links to related resources to this workflow.

  1. Survey123 Media questions
  2. Enhancement solutions for this tool:
    a. More detailed solution with HTML reporting from SafeArcGIS attachments
    b. From AGOL into storing the attachment in another GDB
    Writing ArcGIS Geodatabase Attachments
    Code Free Web Integration, With a Touch of ArcPy
    c. Safe Community question - Writing Portal for ArcGIS (or AGOL) image attachments to SDE

Issue/s

Find a bug or want to request a new feature? Please let us know by submitting an issue.

  1. In the Schema list attribute of the feature service as shown in Instructions, item 5 above, notice that the arcgisonline_attachment{}.globalid attribute is exposed but the translation does not display it. This is a known bug and is reported in FMEENGINE-74184. For reference see the comments section of this Question found in the Safe Community web page.