I'm having trouble finding how to update my Javascript functions once a survey has been published.
Code I add to functions.js in the scripts page of Survey123 Connect works. But once published I want to add additional functions or make changes and when I edit the code in there, hit save, and publish the survey again the updated version on my phone doesn't include those changes.
I can't find functions.js anywhere online in ESRIs systems to edit there.
Can someone please let me know what I'm missing?
Hello @DuncanC,
If you delete the survey on the device and redownload it is the updated JavaScript function present?
When you update the survey on the device the updated JavaScript junction should be present, you can check by accessing the file directly:
If you check in that directory on your device is the JS file the updated file?
In Connect on the Options tab you can also Require update to the latest version of the survey to ensure the survey get's updated on the device.
Hi @ZacharySutherby,
Sorry for the slow reply. I tried looking for that file on my Pixel 7 but that directory seems to be hidden so I didn't get anywhere on that side of things.
But I was working on a survey this afternoon I needed to update javascript in and found out a little more that has greatly improved my workflow and may be helpful in your looking into it.
Just updating the survey normally doesn't update the functions.js file.
Deleting it, and redownloading it also doesn't update the functions.js file.
But if I delete it, force close Survey123 on my phone, and then download it when I reopen, the updates are there.
I don't love this, it's a little clunky to have to tell a end user in the field to do, but at least it's a working solution.