Select to view content in your preferred language

Error "code 1003, Operation rolled back" in app, but not in web browser

2919
4
08-09-2017 11:16 PM
EsriELA
Emerging Contributor

 am receiving an error "code 1003, Operation rolled back".  From everything I have read, this error is caused by multiple Geopoints in the location (I haven't added any geopoints), or incorrectly ended groups (I haven't added any groups) or hyphens or invalid characters in the field names (no special characters in my fields). I do have some calculations in some of my fields. I don't know if this could cause this problem. I receive this error on the mobile app, and on the Survey123 desktop app but the survey uploads fine on the survey123 web browser.

0 Kudos
4 Replies
EsriELA
Emerging Contributor

After a bit more investigation, and removing the repeat from my survey for testing purposes, if have found that the app seems to fall apart on nested if statements in the calculations, but the web browser is handling them fine. Eg:

if(${truckid}<200,1,if (${truckid}<300,2, 3))

SyntaxError: Unexpected token `if' in expression: if( /Geospotter_test/truckid <200,1,if ( /Geospotter_test/truckid <300,2, 3))",

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi there,

The 1003 error is an issue on submitting the data to the feature service (the issue is generated at the Feature Service side).  I was able to test Survey123 based on your function and it submitted successfully.  Given that the issue was at the Feature Service, I'm wondering if there might be a mismatch between the field type as specified in the survey and the field type at the feature service or similar?

EsriELA
Emerging Contributor

Hi James,

Thanks for your response. I think you may be spot on there! It seems that all the calculated fields have been created as strings/ text fields (marked in bold below). But at the same time.. it should allow numbers to be entered into a text field? And the feature service has been created through Survey123, so I'm now not sure how best to proceed!  

  • objectid (type: esriFieldTypeOID, alias: ObjectID, SQL Type: sqlTypeOther, length: 0, nullable: false, editable: false)
  • globalid (type: esriFieldTypeGlobalID, alias: GlobalID, SQL Type: sqlTypeGUID, length: 38, nullable: false, editable: false)
  • recorddate (type: esriFieldTypeDate, alias: Date, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • finger (type: esriFieldTypeString, alias: Select Finger, SQL Type: sqlTypeOther, length: 3, nullable: true, editable: true)
  • loadtime (type: esriFieldTypeString, alias: Time, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • truckid (type: esriFieldTypeInteger, alias: Truck ID, SQL Type: sqlTypeOther, nullable: true, editable: true)
  • tpms_actual (type: esriFieldTypeDouble, alias: Actual TPMS, SQL Type: sqlTypeOther, nullable: true, editable: true)
  • trucktype (type: esriFieldTypeString, alias: trucktype, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • rehandlevol_777_ (type: esriFieldTypeString, alias: rehandlevol_777_, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • rehandlevol_HD785_ (type: esriFieldTypeString, alias: rehandlevol_HD785_, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • rehandlevol_785C_ (type: esriFieldTypeString, alias: rehandlevol_785C_, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • volume (type: esriFieldTypeString, alias: volume, SQL Type: sqlTypeOther, length: 255, nullable: true, editable: true)
  • CreationDate (type: esriFieldTypeDate, alias: CreationDate, SQL Type: sqlTypeOther, length: 8, nullable: true, editable: false)
  • Creator (type: esriFieldTypeString, alias: Creator, SQL Type: sqlTypeOther, length: 50, nullable: true, editable: false)
  • EditDate (type: esriFieldTypeDate, alias: EditDate, SQL Type: sqlTypeOther, length: 8, nullable: true, editable: false)
  • Editor (type: esriFieldTypeString, alias: Editor, SQL Type: sqlTypeOther, length: 50, nullable: true, editable: false)
0 Kudos
EsriELA
Emerging Contributor

If I set the binding to decimal or the esriFieldType binding to esriFieldTypeDouble, then the field does not calculate at all..

0 Kudos