Select to view content in your preferred language

Edit Existing Survey throwing - Cannot read property '0' of undefined

1445
7
09-16-2019 06:31 AM
ChrisBlinn1
Regular Contributor

I have a survey embedded in a dashboard.  The survey is using the mode=edit URL param to allow users to edit two fields of a selected feature.  The survey loads correctly and as users select a new feature in the dashboard, the survey updates correctly.  However, if they try to edit the values in the survey, the following error displays:

Nothing appears in the console or in the network tab so I am not sure what else to troubleshoot.

I tested that I could edit existing data by enabling the Inbox feature and editing the fields through the field app.  This all works just fine.  Is there anything else I can do to figure out why the web survey is not working?

Tags (2)
0 Kudos
7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

Just to check, your form does not have repeat sections (which are not yet supported)?  

It would be helpful if you could share your form's design (XLS file).

0 Kudos
ChrisBlinn1
Regular Contributor

Hi James,

No repeats, simply two questions.

typenamelabel
textAVATARAvatar Link:
textHANDLEUsername / Handle:

The only potential "gotcha" is I want to edit an existing secured feature service:

form_titleform_idinstance_namesubmission_url
EOM_2019_DataGISinc Ownershttps://gisi.maps.arcgis.com/sharing/rest/content/items/0020e97c344e4fbb881264969035d9e6

Not sure where the hiccup is.

Thanks,

Chris

0 Kudos
ChrisBlinn1
Regular Contributor

I noticed that the field app specifies the globalid in the applyEdits call.  Do I need to have the globalid in the form as well?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

The global is stored internally and should not be in the form itself.  Given that are using an existing feature service, is there anything unusual about its configuration? Is the layer being edited layer 0?

0 Kudos
ChrisBlinn1
Regular Contributor

No, it is index 1.

0 Kudos
ChrisBlinn1
Regular Contributor

I updated my service to make it index 0 but no change.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Have you tried taking that / out of the label field.  Special chars can cause weird errors.  Just a guess.

0 Kudos