Select to view content in your preferred language

JSONObject["objectid"] not found when submitting survey

4394
6
08-11-2020 08:47 AM
JasonJordan00
Frequent Contributor

This survey123 form was original in ArcGIS Online and working fine. We are migrating it to our Enterprise Portal and now the survey will not submit, stating the error above. 

Here are the first two fields of the feature service as show on it, clearly objectid is a should be found.

  • objectid ( type: esriFieldTypeOID, alias: objectid, nullable: false, defaultValue: null, modelName: objectid, editable: false )
  • globalid ( type: esriFieldTypeGlobalID, alias: GlobalID, editable: false, nullable: false, length: 38, defaultValue: null, modelName: globalid )

Edit: This seems to occur whenever an attachment is added. I have disabled and re-enabled attachments with no luck.

0 Kudos
6 Replies
by Anonymous User
Not applicable

Hi Jason,

What version of Portal are you using? How did you migrate the survey form item and feature service from AGO to Portal? Have you migrated other survey items also, does this occur on all of them or just this one?

If you create a new survey and feature service in your Portal from Connect, with attachments (image question) enabled, does it work ok when submitting to the new survey?

Regards,

Phil.

0 Kudos
MJBiazar
Esri Contributor

Hi Jason,

I know that you mentioned that the error happens only when you have attachments on the form. But I just wanted to share my experience with this error in the past that might be helpful.

Survey123 usually throws this error when there is a mismatch between the field type/length in the feature layer and the values from the survey form. For instance, if you have a decimal value in a question that is writing into an Integer type field, it fails to send the form. 

One way to test this is by population all survey questions with "1" and try to submit. "1" is special because it fits different field types (such as String, Integer, and Double). 

It is also important to look for any hidden question that may not show up on the form but gets populated by a calculation expression. Make sure that the values being calculated in hidden questions  match the field type for those questions in the feature service attribute table. 

All the best,

MJ

by Anonymous User
Not applicable

Hi, I got same error on when submit with Survey123 field app, but no error when submit with browser. After test and test, found the reason for my case is: for the geopoint field in repeat, must select a location even it is not required.

Mine version is: Survey123 App v3.11.164, Survey123 Connect v3.11.123, maybe it is a bug?

by Anonymous User
Not applicable

Hi, just want to correct the reason for my case: actually it is caused by the geopoint filed type issue. I set the geopoint with esri:fieldType as esriFieldTypePointZ which means want to get the altitude value. When submit survey with app, if choose location manually then it can only get lat/long but no altitude so will report that SONObject["objectid"] not found error, but if use the button - device location then it can get all lat/long/altitude value so no errors.

Felicitychun
Occasional Contributor

I was getting this same error. And also found it was with attachments and photos.

I am on Portal Enterprise. I have found the issue seems to be around the view of the feature layer I created and had the survey submit to this view layer through the submission url.  I changed the submission url to the original hosted layer and it seemed to send through ok. I had created this view to set different editing settings for users using the field app compared to users who can review and edit all data.

I have another very similar app on the same platform that has worked fine with submitting to a view layer. Both view layers were created and configured within the portal. So it seems there was something wrong in the creation of that other particular view layer that lead to the issue.

0 Kudos
mjennings323
Emerging Contributor

I'm having the same error though I don't have a geopoint in the survey nor are the attachments are causing the issue. I have a pulldata() function that pulling questions from a separate excel spreadsheet. If I don't fill in anything for that particular part, the survey goes through fine. I have two pictures for reference. 

mjennings323_0-1691015628567.png

mjennings323_1-1691015657052.png

 

 

0 Kudos