Operation Rollback Error in ArcGIS Online but works in Portal

870
6
Jump to solution
09-13-2021 08:50 PM
ChrisRoberts2
Occasional Contributor III

HI

I have a form that I built in our Enterprise Portal for testing and development and has been working fine, records submit without an issue.  I just made a copy of th survey and published it to ArcGIS online to be made public (made no changes) but now when I go to submit a record I get an Operation Rollback error.

I saw this post (https://community.esri.com/t5/arcgis-survey123-questions/keep-getting-send-error-operation-rolled-ba...) and made some slight changes as I thought that maybe it was because some fields were being created as String when they should probably be decimal eg lats and longs.  Originally they were hidden field type, so I made them decimals and set the Appearance to hidden instead.  But I still get the error.  I have attached the xlsx from the Portal (the one with Development) version, plus the one I adjust in ArcGIS Online as a comparison.  There are also a few required csv file for pulldata functions thay I attached as well.

I have a tight timeline to get this fixed so I would really appreciate any input anyone might have.

Thanks in advance

Chris

0 Kudos
2 Solutions

Accepted Solutions
ChrisRoberts2
Occasional Contributor III

Hi Phil 

Thanks for the prompt reply.

Log file atatched.

I created a copy of the Survey using the "Save As" option in Connect.  I just tried create a version from file, published but still the same error.

I'll have a look at the other things you pointed out as it might/must be something in there.  Why would it work in Portal and not AGOL?

Just in regards the first geopoint question being null.  I did it that way as it needs to be because that grabs the device location and is only used it the select location is other and therefore there is no coordinates to use from the pulldata.  So it needs to be before the "final" geopoint questions doesnt it?

View solution in original post

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @ChrisRoberts2,

I also just noticed that the CSV files in media folder also have commas and other special characters in the columns that are used for lookups and pulldata. This may cause issues or values not to be displayed correctly in both field app and the web app, or when using data in other systems or reports. Avoid using commas and special characters for lookup value data, or in name columns and choice lists or pulldata lookups, except for in the label column only it is fine.

As for the order of the geopoint questions in the repeat, the order matters only when publishing, as we check for the geopoint/geotrace/geoshape or null values to correctly set the layer/table type. Once it is published and those are created, you can change the order around.

In your case it is creating a table only for the repeat, which means "duck_species" is not a layer, and does not have any geometry fields in feature service for that table. 

PhilipWilson_0-1631599242218.png

I beleive this is the reason for the operation rollback error. Looking in the logs can see the following:

<15>1 2021-09-14T04:33:31Z iPhone ArcGISSurvey123 2855 - [AppStudio@11205 category="XFormFeatureService" function="onSuccess" filename="XFormFeatureService.qml" line="766"] XFormFeatureService: applyEdits:errors: [
{
"code": 1003,
"description": "Operation rolled back.",
"tableId": 0
},
{
"code": 1000,
"description": "No mapping exists from object type ESRI.ArcGIS.Client.Geometry.MapPoint to a known managed provider native type.",
"tableId": 1
}

This would indicate that geometry data is trying to be submitted to a table in the feature service which it can not process as there are no geometry fields on that table. You need to re-publish the survey, create from scratch again, ensuring the repeat is created as a layer. Do this by swapping the order of the null geopoint under the other geopoint, and then after successful publish you can put the order back to how it was.

As for why it worked in Enterprise and not AGO, it is likely since creating the survey you added the extra null geopoint and/or changed the order. Probably the first time you publishing that survey in Enterprise there was only one geopoint and it was not null. Just a guess, as the publishing process is the same, so you woudl get this problem now if you also publish the xlsx file as it is to Enterprise again.

Regards,

Phil.

View solution in original post

6 Replies
Philip-Wilson
Esri Notable Contributor

Hi @ChrisRoberts2,

What version of Survey123 Connect and field app are you using?

Can you collect the diagnostic logs from when you get the error, so we can see if there is any additional information in the logs that will help. Turn on logging in the Settings>Diagnostics, and then following the same steps to get the error, then stop logging, save the log file and send.

How did you create the copy of the survey? Via the Connect option "Save as" on the survey tile, or did you manually copy the entire folder from My Survey Designs folder? Depnding on how you did this, there could be an issue with copying the survey and the .info and other config files in these folders. You would need to ensure any references to original survey and items or the different organisation do not exist.

Can you try the Create from File option, select the xlsx file, then copy the CSV files into media folder. If you publish that survey to AGO and open in field app, does it work as expected?

Having a look through your XLSForm, I can see a few obvious errors/issues, they may not cause the operation rollback, but should be fixed up either way:

- Row 18 - "field-list w1" is applied to a text field.

- Row 27 - begin repeat has no query parameter, no repeats will be loaded in Inbox.

- Row 27 - "field list" is being applied directly to a repeat, not a group but you are also trying to use grid theme for rest of survey. Note that a repeat must be inside a group if mixing pages and grid theme.

- Row 30 - "table list" is not supported in grid theme. You can not use these two together in same group (pages).

- Row 62 - the first geopoint (geometry quesiton) in the repeat is a null, this will cause the related layer to get created as a table only, and not a layer with geometry. The non-null geopoint needs to be first in the order of the questions, so that it sets the correct layer type, not a table.

- Row 71 and 72 - there are values in bind::esri:parameters column that look like input mask values.

- Row 158 - "image map" can only be applied to select one and mulitple question, not geoshape.

These are just a few things I picked up from a quick look at the xlsx file, there could be more issues.

Regards,

Phil.

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @ChrisRoberts2,

Further to my above comments, I just tried publishing and submitting surveys to AGO with your XLSForm, made a few minor fixes for above, but otherwise it was the same, and it works without error.

I am guessing the problem is related to how you copied the survey and published it to AGO. Can you check the .iteminfo file in the survey folder - open it in notepad.

Are the following properties correct for the Org that you published the survey to and the id should match the itemID of the Form item it created in AGO:

"orgId": "XXXXXXXXXXXXXX",
"owner": "XXXXXXXXXXXXX",
"ownerFolder": "XXXXXXXXXXXXXXXXXXXX",

"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",

Regards,

Phil.

 

0 Kudos
ChrisRoberts2
Occasional Contributor III

Hi Phil 

Thanks for the prompt reply.

Log file atatched.

I created a copy of the Survey using the "Save As" option in Connect.  I just tried create a version from file, published but still the same error.

I'll have a look at the other things you pointed out as it might/must be something in there.  Why would it work in Portal and not AGOL?

Just in regards the first geopoint question being null.  I did it that way as it needs to be because that grabs the device location and is only used it the select location is other and therefore there is no coordinates to use from the pulldata.  So it needs to be before the "final" geopoint questions doesnt it?

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @ChrisRoberts2,

I also just noticed that the CSV files in media folder also have commas and other special characters in the columns that are used for lookups and pulldata. This may cause issues or values not to be displayed correctly in both field app and the web app, or when using data in other systems or reports. Avoid using commas and special characters for lookup value data, or in name columns and choice lists or pulldata lookups, except for in the label column only it is fine.

As for the order of the geopoint questions in the repeat, the order matters only when publishing, as we check for the geopoint/geotrace/geoshape or null values to correctly set the layer/table type. Once it is published and those are created, you can change the order around.

In your case it is creating a table only for the repeat, which means "duck_species" is not a layer, and does not have any geometry fields in feature service for that table. 

PhilipWilson_0-1631599242218.png

I beleive this is the reason for the operation rollback error. Looking in the logs can see the following:

<15>1 2021-09-14T04:33:31Z iPhone ArcGISSurvey123 2855 - [AppStudio@11205 category="XFormFeatureService" function="onSuccess" filename="XFormFeatureService.qml" line="766"] XFormFeatureService: applyEdits:errors: [
{
"code": 1003,
"description": "Operation rolled back.",
"tableId": 0
},
{
"code": 1000,
"description": "No mapping exists from object type ESRI.ArcGIS.Client.Geometry.MapPoint to a known managed provider native type.",
"tableId": 1
}

This would indicate that geometry data is trying to be submitted to a table in the feature service which it can not process as there are no geometry fields on that table. You need to re-publish the survey, create from scratch again, ensuring the repeat is created as a layer. Do this by swapping the order of the null geopoint under the other geopoint, and then after successful publish you can put the order back to how it was.

As for why it worked in Enterprise and not AGO, it is likely since creating the survey you added the extra null geopoint and/or changed the order. Probably the first time you publishing that survey in Enterprise there was only one geopoint and it was not null. Just a guess, as the publishing process is the same, so you woudl get this problem now if you also publish the xlsx file as it is to Enterprise again.

Regards,

Phil.

ChrisRoberts2
Occasional Contributor III

Thanks Phil!

I owe you a beverage ... or 3!

It was that gepoint questions.  I removed the first null one, published, added it back in republished and all is right with the world again!

When I first created the form on portal I didnt have the null geopoint question, that was added some time after.  So thats why a straight copy and publish to AGOL caused the problem.

Thank you very much for your rapid reponse.

0 Kudos
Philip-Wilson
Esri Notable Contributor

@ChrisRoberts2 no problem, happy to help. Glad you got it working. Look forward to the 3 beverages! 🙂

0 Kudos