Select to view content in your preferred language

Does the custom JS function work on a web form?

957
3
Jump to solution
02-28-2022 03:52 PM
by Anonymous User
Not applicable

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

 

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

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.

- Josh Carlson
Kendall County GIS

View solution in original post

3 Replies
jcarlson
MVP Esteemed Contributor

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.

- Josh Carlson
Kendall County GIS
by Anonymous User
Not applicable

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

0 Kudos
by Anonymous User
Not applicable

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.

0 Kudos