We have developed a survey that uses pulldata(@javascript..) to invoke a javascript function to calculate a value. The survey with the js function has worked in the past but it suddenly presenting the user with "Scripts disabled" where the calculated value should be.
My Survey123 app was recently upgraded to version 3.11 but the error still appears in S123 v 3.10.x on another device. The error also appears using both iPad and Android, so doesn't seem to be related to the OS.
The survey is shared to an ArcGIS Hub group within AGO org. The error does NOT appear when I use my AGO account rather than an account from the Hub. I am aware that JavaScript functions are only supported in forms completed by users in the same organization as the form author, but the Hub group is part of the AGO org and has worked previously.
Solved! Go to Solution.
Did some more trial and error this morning on different devices and figured it out.
Long story short, it doesn’t just depend on what org the *signed in* user is… it also (now at least) depends on the org of the user *that downloads or updates the form*. In this case I’d downloaded the form to Survey123 with a corporate org account, then signed out of that account and signed back in with my HUB org account and tried to use the form. This has worked for me in the past.
Anyhow, after either delete and reinstall, or just ‘update’ the form when the Hub account is signed in to S123 it will now work with the Hub account as expected. Did the same from the corporate account and now Hub account doesn’t work again. Also confirmed that it’s not the same form republished (i.e. two forms that look the same and named the same)—it’s the singular form that lives on Hub.
This is an issue that most users will probably never encounter (because why share to someone in an org that wont work anyhow?), but just adding it to the record.
Hi @BillSimper,
Yes this is expected and actually it has always worked that way. When the form is downloaded the org information is stored in the info file that gets updated in the survey form folder on the device. Therefore the signed in users org must match this org information of the survey when it was downloaded.
Phil.