Hi all,
Having issues with a ArcGIS online joined view layer with:
I am getting this error:
Domain: com.esri.arcgis.runtime.error
Code: 3018
Description: The field already exists.
Any help appreciated.
Cheers
Solved! Go to Solution.
Hey Nik
There is surprisingly little on how to deal this error on the internet, but I also came across this error as well and was able to find the answer, at least for my situation.
For me, this error displayed in ArcGIS Collector when I tried the view (and edit) the layer. Interestingly, were no problems displaying or editing the hosted feature layer in either the Portal webmap or ArcGIS Pro. The issue was due to trying to "enable editing" (Portal layer settings) for a hosted feature layer in which already had edit tracking fields (date/user created/edited). I ran into this situation as I wanted to overwrite or created a new version of the layer I had been using, and wanted to maintain the existing edit/create fields and dates/times as well as continuing to add new.
I was able to solve this by going back into Pro and using the original featureclass, and using the "Enable Editor Tracking" tool, and populating the existing fields for date/user created/edited (and not selecting "add fields"). After publishing the new version to Portal, the "edit tracking" box on layer options was already checked and everything worked fine. Problem solved!
Hope this helps you. It may not be the editor fields, but its probably something similar of an auto-created field. Test by turning off "edit tracking" within layer settings of Portal (or AGOL) and check if the error is still present. Re-test by unchecking editing in the layer settings. Hopefully you can track down the issue by process of elimination.
Cheers
Platform error codes—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
see:
3018 | Geodatabase Field exists exception. |
Hey Nik
There is surprisingly little on how to deal this error on the internet, but I also came across this error as well and was able to find the answer, at least for my situation.
For me, this error displayed in ArcGIS Collector when I tried the view (and edit) the layer. Interestingly, were no problems displaying or editing the hosted feature layer in either the Portal webmap or ArcGIS Pro. The issue was due to trying to "enable editing" (Portal layer settings) for a hosted feature layer in which already had edit tracking fields (date/user created/edited). I ran into this situation as I wanted to overwrite or created a new version of the layer I had been using, and wanted to maintain the existing edit/create fields and dates/times as well as continuing to add new.
I was able to solve this by going back into Pro and using the original featureclass, and using the "Enable Editor Tracking" tool, and populating the existing fields for date/user created/edited (and not selecting "add fields"). After publishing the new version to Portal, the "edit tracking" box on layer options was already checked and everything worked fine. Problem solved!
Hope this helps you. It may not be the editor fields, but its probably something similar of an auto-created field. Test by turning off "edit tracking" within layer settings of Portal (or AGOL) and check if the error is still present. Re-test by unchecking editing in the layer settings. Hopefully you can track down the issue by process of elimination.
Cheers
Platform error codes—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
see:
3018 | Geodatabase Field exists exception. |
Thx Robert! This really helped me to fix my problem fast:-)
Thanks Robert,
My situation is primarily all AGOL with hosted feature layer created from uploaded file, so all I need to do is re-upload that file (this time without Editor, Creator and date fields).
As I believe it was these fields that get duplicated when creating a layer from uploaded files?
Anyway, I gave up on that in the end and went without.
Thanks again for all your feedback.
Thanks Robert! I have similar situation and your solution works!
Excellent!
Hello - I am running into the same issue. When I uncheck editor tracking in portal the issue goes away. The editor tracking is still needed though. How can I prevent the error from occurring while still having editor tracking? Do I need to define my own editor tracking fields?
any help would be greatly appreciated!
If you configure your own editor tracking fields incorrectly, like set to non-nullable or field definitions is set to editable, you can run into the issue. The message can be improved.
Thank you - I used the enable editor tracking tool so I assumed it would work by default. I will try a few different methods of enabling editor tracking and seeing if that fixes the issue.
I appreciate the details - though I agree it would be nice if the error message at least told you which fields are causing the issue.
Hi Miaogeng, I think this answer might be the solution to my problem, but I'm just wondering, why do you say that having custom editor tracking fields that are set to non-nullable are "configured incorrectly"?
I have been working with a dataset for some time that uses non-nullable custom editor tracking fields in Survey123 and Collector Classic, and it has only caused issues in the new Collector. I didn't find anything in the editor tracking documentation that recommended setting user-defined fields to allow nulls, just that they should be string and date fields for the editor and date fields respectively.
This data has a pre-set standard schema that requires the editor tracking fields to be non-nullable; is there a way to overcome this issue in the new Collector without changing them to nullable? Thanks!