What would cause users to see "Extensions Disabled" when using a JavaScript function?

941
7
03-20-2019 06:00 AM
Jodie_M_Gosselin
New Contributor III

We are using a pulldata() function to perform spatial inheritance to populate a county question and district question in a survey shared with our organization. The pulldata() fuction is calling a JavaScript function that queries two feature services we have hosted and shared publicly. Our calculations for the questions are set up like this:

   

pulldata("@javascript","myJSFunctions.js","returnFirstIntersectingFeature","https://services2.arcgis.com/(OurAccount)/arcgis/rest/services/(OurFeatureService)/FeatureServer/0",string(${location}),"*",pulldata("@property","token"),true)

Users within our organization let us know that the questions weren't populating. I made the questions a multiline, text questions so the results could be shown. They said that they were seeing "Extensions Disabled" in the text box. This error seems to be carrying over when they open other surveys that were previously working as well. Completely closing the app and restarting fixes the previously working survey but they still get "Extensions Disabled" in the new survey.

The fields were being populated when testing through Survey123 Connect and when we were signed in to our Administrator account in the Survey123 app.

Is there something that could be causing this?

0 Kudos
7 Replies
Jim-Moore
Esri Regular Contributor

Hi Jodie

Thanks for the details. Would it be possible to provide your XLSForm and .js file so I can investigate? Also could you please confirm on which version of the field app your users are seeing the issue?

Thanks & regards,
Jim

0 Kudos
Jodie_M_Gosselin
New Contributor III

Hi Jim,

I just added a .zip file to the original question that contains the XLSForm and .js file we are using. I saw a previous questions about spatial inheritance that linked to this page: Welcome to our Feedback Community I tried using those examples in my form.

Thank you

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Jodie

Thanks for the files. I am not seeing the "Extensions disabled" message when running your survey in the latest version of the field app (3.3.64). Which version of the field app are you using (and on which devices)? There was an issue with the string(${location}) function on a pre-release beta build (which was available for download on EAC). This was rectified prior to the final 3.3 release.

Also, could you please confirm that your users are signed in to the same ArcGIS Online organization that the survey was published to? This is currently a prerequisite for JavaScript functions.

Best regards,
Jim

0 Kudos
Jodie_M_Gosselin
New Contributor III

Hi Jim,

I had our users update to the latest version before testing so they should be on the latest 3.3.64 build. I believe they were using Nexus 7 tablets and iPhones. The feature services that the form calls only cover Pennsylvania. It seems like only users within the state of PA are experiencing the error. We had 2 users test the survey in Massachusetts and just place a point in PA and the fields populated. However, the 3 users who will be using the survey in PA were getting extensions disabled.

Do the users need to be assigned any particular roles on AGOL?

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Jodie

Thanks for the additional information. User roles shouldn't affect the pulldata @javascript function.

Are users seeing the error message for both pulldata @javascript questions, or just one or the other? And are the CountyName and DistrictNo questions (using pulldata @json) being populated correctly, regardless of the error message?

I've done a bit more testing and noticed that with CountyData I would receive the debug messages from the JavaScript function but never the JSON (the CountyName question was working correctly regardless). It appears the JSON returned for the CountyData question is getting truncated because text questions have a default length of 255 (this doesn't appear to be an issue for DistrictData, where the JSON returned is comparatively short). If I set bind::esri:fieldLength for CountyData to, say, 1000 the JSON appears. Could you please try increasing the field length to see if this helps?

Kind regards,

Jim

0 Kudos
Jodie_M_Gosselin
New Contributor III

Hi Jim,

I updated the fieldLength to be 1000 and the full json was showing up for me on both now. The fields populate for me when I place my location in PA.

Our users in PA on the other hand are still getting "extensions disabled" in both text boxes. We received another suggestion to make sure the feature services were shared just to our organization and not publicly and that didn't seem to help either.

Thanks for the help

0 Kudos
Jim-Moore
Esri Regular Contributor

Thanks Jodie

As mentioned previously, the JavaScript functionality currently only works if a user is signed in to the same AGOL organization that the survey is published to. Just to double-check, is that the case with your PA users?

If possible, could you test the survey on your device using one of the PA logins?

Best regards,

Jim

0 Kudos