Error editing data after dropping field from hosted feature service

864
3
Jump to solution
04-16-2020 01:36 PM
Trippetoe
Occasional Contributor III

I have an AGOL Hosted Feature Service that's been around for a long time. Several maps and apps have been built on the feature service.

Today, i deleted one field from the service (field name = 'HearingDate'). To delete the field, I used the AGOL Item > Data > Table page; clicked the field name, then selected Delete. The field seemed to be deleted as expected:

  • The field no longer appears in the Item > Data Table or Fields view
  • When I view the item's REST browser page, the field is not present
  • When I open the 'Configure Popup' dialog in a web map, the field is not listed
  • When I open the WAB 'Edit or create item' widget, the field is not present.

After dropping the field, i am unable to edit data in the table:

  • I tried editing directly in the Items > Data > table grid view
  • I tried editing directly in a web map
  • I tried adding map with the layer to a WAB and use the Edit widget
  • I tried editing in the REST browser for the service.

All those efforts result in the following response:

{"addResults":[],"updateResults":[{"objectId":51099,"uniqueId":51099,"globalId":null,"success":false,"error":{"code":1000,"description":"Invalid column name 'HearingDate'."}}],"deleteResults":[]}

Any ideas about what's going on?

Here is a typical update request against the feature service. Note that the phrase 'HearingDate' is not part of the request.

[{"attributes":{"OBJECTID":51099,"CaseNumber":"6705943754","DateReceived":1532735978738,"Complainant":"test 105","ComplainantPhone":null,"ComplainantEmail":null,"Address":"Test Address","City":"Test city","IncidentDescription":"testing","SiteStatusDate":1532735978738,"DispositionDate":1532735978738,"DispositionNotes":null,"TagNumber":null,"TagIssuedDate":null,"IgaPartner":null,"Icomp":null,"PostingDate":null,"Latitude":null,"Longitude":null,"CitationNumber":null,"RespondentName":null,"IssuedDate":null,"ResponseDate":null,"Costs":null,"TotalCitationAmount":null,"JudgementDate":null,"HearingsOfficerJudgement":null,"CitationComments":null,"AsbestosSampleDate":null,"AsbestosSampleCount":null,"CaseAgeInDays":621,"DataApprovedDate":null,"SiteStatus":"Dirty","CleanupTime":null,"HasEvidence":"No","Disposition":"Open","CaseType":"Report","WasteSource":null,"DumpLocation":null,"EnvironmentalSensitivity":null,"DumpSize":null,"IsFreeBox":null,"CampersPresent":null,"PersonalProperty":null,"IsActive":"Yes","SuspectAsbestos":"No","ReportedMethod":"Website","County":"testing","AssignedCrew":null,"InvestigatingOfficer":null,"CitationResponse":null,"AsbestosSampleResults":null,"DataApproved":null,"SiteNotes":null,"IsTheftOfService":"No","LocationDetails":null,"ReferredToAgency":null,"ReportID":"RPT0Test","ReportStatus":"Received","ReportStatusDate":1532735978738,"ReportStatusNotes":null,"ReportedCount":1,"ReporterHasEvidence":"No","ReporterFirstContactedDate":null,"ReporterContactNotes":null,"reporterEvidenceDetails":"","EditDate_1":1534591020000}}]

1 Solution

Accepted Solutions
Trippetoe
Occasional Contributor III

Josh from Esri tech support gave me the solution to problem.  I needed to disable/save/enable/save all the 'Editing' settings for the hosted feature layer. From Josh: 

The editing setting "Keep track of created and updated features " creates a back end table that lists out all of the fields in the feature layer. When deleting fields, this table does not always update. When the table in the feature layer and this back end table do not match, it disallows editing capabilities. Turning this option on and off  causes the table to refresh and update with the correct data.

View solution in original post

3 Replies
Trippetoe
Occasional Contributor III

Josh from Esri tech support gave me the solution to problem.  I needed to disable/save/enable/save all the 'Editing' settings for the hosted feature layer. From Josh: 

The editing setting "Keep track of created and updated features " creates a back end table that lists out all of the fields in the feature layer. When deleting fields, this table does not always update. When the table in the feature layer and this back end table do not match, it disallows editing capabilities. Turning this option on and off  causes the table to refresh and update with the correct data.
LeonS
by
Occasional Contributor II

This worked for me.  Thanks for sharing!

0 Kudos
by Anonymous User
Not applicable

This also solved my issue, thank you for sharing!

0 Kudos