Survey123 JavaScript PullData extension not working in website

1670
5
Jump to solution
08-10-2020 07:13 AM
ChrisBlinn1
Occasional Contributor

I have published a survey using the latest 3.10 version of Connect, that includes a JavaScript file in the extensions folder.  Everything works great in Connect.  I am opening the survey with a portalUrl parameter in a web browser (tested in MS Edge - 84.0.522.52, Chromium and Google Chome - 84.0.4147.105)  

Running developer tools, a 400 error code is thrown trying to access the JavaScript file, with the message "Info file for item not found".

However, I can see the JavaScript file in the item content directory on the Portal server:

Is this just a limitation with the Survey123 website?

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Hi. You need to put your JavaScript function in a folder called 'scripts'.

See https://community.esri.com/groups/survey123/blog/2020/08/07/extending-survey123-smart-forms-with-cus... for details.

The 'extensions' folder is only supported (for backwards compatibility) with previous versions of Survey123 field app.

View solution in original post

5 Replies
IsmaelChivite
Esri Notable Contributor

Hi. You need to put your JavaScript function in a folder called 'scripts'.

See https://community.esri.com/groups/survey123/blog/2020/08/07/extending-survey123-smart-forms-with-cus... for details.

The 'extensions' folder is only supported (for backwards compatibility) with previous versions of Survey123 field app.

ChrisBlinn1
Occasional Contributor

Perfect, thanks Ismael! We're up and running!

DanaLRobinson
New Contributor III

 

I have a similar problem, I am getting the following error when trying to publish from Survey123 Connect v 3.9.20 to AGOL (maybe a portal for my org?) Here is the error message.  I have also attached a snapshot of the folder for my survey123 project.

DanaLRobinson_1-1613583196854.png

 

DanaLRobinson_0-1613582913484.png

The form is still pertinent, so any shortcuts to avoid rebuilding entirely would be appreciated.

 

 

 

 

0 Kudos
IsmaelChivite
Esri Notable Contributor

@DanaLRobinson  Please upgrade Survey123 Connect to the latest release.  Upgrading Connect will not cause data loss. If the problem persists I suggest you contact Esri Technical Support so they help you recover your existing survey from ArcGIS Online. The process is as follows:

  1. First you need to make sure your survey is in ArcGIS Online. You can form example download your survey into the field app first. If this is possible, then your form is in good health in Online. Good thing. If you cannot download the survey into the field app then you have bigger problems. Hopefully this is not the case.
  2. Then, you delete the local copy that Survey123 Connect keeps in your computer. It is likely that the local copy is corrupted somehow. The .info file is missing in your survey directory folder. The .info file is not to be confused with forminfo.json  To delete the local copy you need to delete the folder PDO Patrol Log that you show in the screenshot above. I suggest you do this while Connect and Excel are both closed.
  3. Then you use Survey123 Connect to download the survey from Online into Connect again. You will see a download icon in the gallery for your survey.

Step number 2 can be dangerous if you do not know exactly how to delete the local copy. To do this with confidence please open an Esri Technical Support case so they can guide you.

 

DanaLRobinson
New Contributor III

Thank you! That worked! Form is saved!

 

0 Kudos