Cannot add new features to hosted feature service in ArcGIS Online or ArcMap

9217
7
07-09-2014 07:06 AM
KendellRyan
Occasional Contributor

I have a hosted point feature service that we have been editing (moving points, editing attributes) with no issue.  We tried adding a new point and realized it will not save a new feature.  When we edit in ArcMap we are following the workflow of creating a local copy, editing, then syncing. But when adding a point it disappears (though the attributes for the missing point show up in the table).  When we try adding the point in ArcGIS Online we can't add a new feature at all either.  I confirmed that all of the edit options are enabled (add, update, delete).  I do have edit tracking enabled (I enabled it in ArcGIS Online, not prior).  The source of the data was a shapefile that was published, fyi.  Any help appreciated.

7 Replies
MikeMinami
Esri Notable Contributor

Can I get your shapefile to try to reproduce this?

Can I get access to your actual service?

Thanks,

Mike

0 Kudos
KendellRyan
Occasional Contributor

I tried replying to the email but it didn't go through.  I can invite you to my AGOLO group. what is your username?

I can email you the shapefile tomorrow.

0 Kudos
MikeMinami
Esri Notable Contributor

I've asked our GeoNet admins about how to send private messages. Currently, the only way to so is for each of us to "Follow" each other. So we can temporarily follow each other and can exchange messages through GeoNet.

Thanks,

Mike

0 Kudos
KendellRyan
Occasional Contributor

I attempted to do that this morning (followed you and then sent a message). Let me know if you didn't receive that.

Thanks.

0 Kudos
MikeMinami
Esri Notable Contributor

The problem turned out to be feature templates that had null default values, but the fields as published from desktop did not allow null values. The question is how did the templates end up with null values. We were not able to figure out the exact cause. Republishing the shapefile from desktop resolved the problem. Alternatively, editing the feature templates in AGOL map viewer to add a default value would probably have cleared things up as well.

Thanks,

Mike

Mtclimber03
Occasional Contributor

Hi guys,

I had the same error come up in my organization with a hosted feature service yesterday. Mike's suggestions may have fixed my error. However, I also realized I had an active definition query on the "problem layer" when published that I believe to be apart of the error. Removing the definition query and republishing has resolved the error for me.

-Charlie

0 Kudos
RobBlash
Occasional Contributor III

I came across this issue and my resolution was similar, thought I'd share to help anyone else in the future

If you published your data with a definition query on it (in my case from a file GDB from ArcGIS Pro 2.2.4), and your edit template for the hosted feature service does not satisfy that definition query, you cannot create new features in that feature service. Updating the template to satisfy the definition query will resolve the issue. This is an odd one, since that definition query no longer has an bearing on the data (you can then go ahead and edit the new feature to fall outside of that definition query).

Also, if you've configured a layer on your hosted feature service to enforce an attribute as unique, and your template does not provide a value for that attribute, a new feature cannot be created. Similarly, if you attempt to add a new feature that's duplicating that unique attribute, the feature will fail to create (no warnings provided).

0 Kudos