Soft delete with editor widget

1263
6
09-27-2016 07:43 AM
Tevfik_ÇağrıDural1
New Contributor III

Is it possible to soft delete the data with editing widget?

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Whats a soft delete?

0 Kudos
Tevfik_ÇağrıDural1
New Contributor III

I might want to bring "soft" deleted data back. So users think that they deleted the data and will not be able to read or change it, but administrators can read and bring them back. 

A better explanation of soft delete Definition from PC Magazine Encyclopedia 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tevfik,

  OK, sorry I don't have a suggestion for that then.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Just throwing a few possible workaround (with no scripting suggestion). I have not messed with editing so  not sure if any of these are possible or not.

  1. can you have a "status" field that is not displayed, but is used to filter.   If deleted, change the flag to "deletepending" or something similar and then filter those out from what you can edit.  
  2. or, create a GP service that takes a copy of the deleted line and copies is before getting deleted.
  3. or, keep a pre-edit copy of the data, then post editing have a script to find what has changed.

Pretty brunt force options, but if it's important and if there are no other easier alternatives, sometimes you have to create a few more hoops until something better is available.

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Tevfik,

I suppose if you configured the Edit Widget with a feature service with a data source that's an enterprise geodatabase, with a feature class that is registered as versioned, this might be possible. After making edits, you could potentially recover the "deleted" data at the database level (e.g., within the geodatabase) by querying the feature classes' delta tables (A and D tables). This would likely require some custom development work.

Hope this helps,

Tevfik_ÇağrıDural1
New Contributor III

Hello Robert, Rebecca and Derek,

Thank you so much for your time and comments.

Those are really good ideas. I'll be trying all of them.

0 Kudos