Does the custom JS function work on a web form?
I created a custom JS function on Survey123 connect and published it on AGOL for Organization and then embedded the survey form in an ArcGIS Dashboard. I followed instructions in the Survey123 Tricks of the Trade: Embedding a survey in an ArcGIS Dashboard blog post.
The calculations I added in custom JS functions aren't working in the web survey form. If the custom JS functions added in the Survey123 Connect don't work in a web survey form, what would you suggest in order to accomplish the same calculation tasks on the web survey form?
The data will be collected using the Survey123 field app. For updating the survey, we need to use the web survey form with a map.
I would greatly appreciate your assistance.
Thank you,
Makiko
Solved! Go to Solution.
I can't think of why the JS functions wouldn't, except that custom JS functions require the end user to be an authenticated user, and won't work for anonymous users. Is that related to your issue? We use custom JS functions in several web app forms, and they work fine.
I can't think of why the JS functions wouldn't, except that custom JS functions require the end user to be an authenticated user, and won't work for anonymous users. Is that related to your issue? We use custom JS functions in several web app forms, and they work fine.
Thank you so much for your response. Your answer assured me that something is wrong with my JS code. I will debug my JS code.
Thank you,
Makiko
Hi @Anonymous User,
You can find a list of known issues and supported features with JS functions in this doc article:
https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm
As @jcarlson points out, the most obvious one is that users must be signed in, and the JS function (survey) must originate from the same org that the user belongs too.
Regards,
Phil.