I’m trying to share survey results with a user. The user can see the information under the Overview and the Data tabs but the Analyze tab returns this message “Cannot get necessary XForms file for the survey”.
All three tabs loaded fine for me on different browsers.
Please advise,
Thanks
Hi @AyeletGreenberg,
Have a look at this post:
https://community.esri.com/t5/arcgis-survey123-questions/survey-123-problem/td-p/801585
Try to publish again and if that works check what's the difference. Also, as mentioned in the post above, moving the survey out of the folder in which it was published often causes errors.
Hope this helps,
Uri
Hi Uri
I published the survey again, but it didn't solve the problem. The user can see the data, but the Analyze option still returns an error.
The survey was created from an existing feature service with a related table. I checked another survey that was created in the same way and the user encountered the same problem with analyzing the data. I then shared a survey created from a feature service w/o a related table, and the user could open the Analyze tab and see the data.
I noticed that data from related tables don't behave the same way as data from feature services on the Survey123 website. For example, I can't include photos in reports from related tables.
We actually have the exact same issue inside a project.
Two surveys have been created where one holds the initial feature layer, the second one (where UI is optimized for mobile phones) populate the same layer via submission_url parameter in settings sheet.
Now i cannot open data + analysis tab in both surveys.
@MarcMuehleisen You have any luck figuring it out? I just had it happen on a form.
I am having the same issue with a survey that has related tables and calls a feature service for some of the questions. Curious what solutions come out of this.
We had the same problem. Developing a (submission) survey, many times publishing and testing the form in survey app. But during development the createReport API start failing and we got the message as mentioned above. We did some testing. Finally we found the reason. In one field we are using the search appearance and when we use the % sign in the url+parameters xfom is broken for analyse and data and alos the createReport API.
So we had search appearance like this:
autocomplete search("GKB_Project?url=https://services9.arcgis.com/CjT8oELYhF7fnj6q/arcgis/rest/services/service_e7e8bc459ba240c5a1153dcbc... DESC&where=Projectnummer LIKE 'WHGB%' AND UPPER(Omschrijving) LIKE '%ROLDEUR%'") w3
Using as above xform is broken, removing the % sign everything works fine. Tomorrow we will make a support ticket about this. Maybe is it's helping others to solve the message ' Cannot get necessary XForms file for the survey.
Workaround
<select1 appearance="autocomplete search("GKB_Project?url=https://services9.arcgis.com/CjT8oELYhF7fnj6q/arcgis/rest/services/service_e7e8bc459ba240c5a1153dcbc... DESC&where=Projectnummer LIKE 'WHGB%' AND UPPER(Omschrijving) LIKE '%ROLDEUR%'") w3" esri:style="<body backgroundColor='#f8f8f7'>" ref="/Deurinspecties/LocatieGegevens/ProjectCode">
<label>Projectcode</label>
<hint><output value=" /Deurinspecties/LocatieGegevens/ProjectOmschrijving "/></hint>
<item>
<label>Projectnummer</label>
<value>Projectnummer</value>
</item>
</select1>
Workaround
<select1 appearance="autocomplete search("GKB_Project?url=https://services9.arcgis.com/CjT8oELYhF7fnj6q/arcgis/rest/services/service_e7e8bc459ba240c5a1153dcbc... DESC&where=Projectnummer LIKE 'WHGB%' AND UPPER(Omschrijving) LIKE '%ROLDEUR%'") w3" esri:style="<body backgroundColor='#f8f8f7'>" ref="/Deurinspecties/LocatieGegevens/ProjectCode">
<label>Projectcode</label>
<hint><output value=" /Deurinspecties/LocatieGegevens/ProjectOmschrijving "/></hint>
<item>
<label>Projectnummer</label>
<value>Projectnummer</value>
</item>
</select1>
In my case, deleting the Hosted View that gets created when sharing the results fixed the issue. When the results of a S123 are shared with organization or a group, a new hosted view layer is created (SurveyName_results with an URL derived from form item ID).
This view will pick the service name of the survey (you will see something like this when the view layer is created): https://services3.arcgis.com/ABCovkCPMyTRnuA7/arcgis/rest/services/survey123_abcd78e7d2b54065656625r...
The service name is derived from the survey form itemID, in the example 'abcd78e7d2b54065656625rtfc01b120', it just adds "survey123" prefix and "_results" suffix to the URL. So, when you unshare the results in S123 web page and delete the hosted view layer, when sharing again, it will create the same URL, as it's derived from the survey form itemID.
The Analyze and Data tabs use this view layer to render the pages. My problem was also that the Survey was using submission_URL from an existing hosted feature layer. This seems to generate some extra issues, like not having the Filter in the data tab (see post here ). But recreating the view also fixed the filter issue.