Select to view content in your preferred language

How do you get the details of the created/edited/deleted feature from Editor Widget

736
4
06-30-2023 06:39 AM
Aeseir
by
Occasional Contributor II

I implemented same model as per example here https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-basic/.

I have a client side feature layer with series of features, these features have a custom field called "geometryIdentifier".

I want to hook into the workflows associated to extract "geometryIdentifier" details if it is being modified or deleted.

Initially I attached listeneres to layers on edit, but that only returns globalId, ObjectId, error, which are all usless to me.

 

I've tried every possible combination and just cannot figure this out.

 

0 Kudos
4 Replies
BlakeTerhune
MVP Regular Contributor

I think you have to query the feature layer with the provided GlobalID or ObjectID if you want the new values.

0 Kudos
Aeseir
by
Occasional Contributor II

Unfortunately that doesn't work in scenarios where the deleteFeatures is triggered, because there is nothing to query.

0 Kudos
BlakeTerhune
MVP Regular Contributor

You mentioned having a listener on the layer for edits. Can you make the query before the edit is committed?

reactiveUtils | API Reference | ArcGIS Maps SDK for JavaScript 4.27 | ArcGIS Developers

0 Kudos
Aeseir
by
Occasional Contributor II

Sorry i missed this, yes i do use reactiveUtils in some cases, but it seems like overkill. Hence why i thought there is a simpler solution.

0 Kudos