Select to view content in your preferred language

Delete a record from feature layer - unable to make it work

525
2
09-18-2024 04:55 AM
mabjo
by
New Contributor

I have a feature layer and a SharePoint list. The SharePoint list contains images with XY coordinates, and is the primary storage, where images are uploaded, updated or deleted.

I have a flow that inserts a point feature in a feature layer whenever there is a new item added to the SharePoint list. This works just fine.

However, I am struggling with an instant flow that is triggered when an image is deleted from the list. The flow triggers ok, but I am running into an error when trying to execute the ArcGIS Enterprise version of "Delete a record from feature layer" action. No matter how I format the Delete Records parameter, I always get the same error when testing:

ResponseSwaggerSchemaValidationFailure

The API 'arcgisenterprise' returned an invalid response for workflow operation 'Delete_a_record_from_feature_layer' of type 'OpenApiConnection'. Error details: 'The API operation 'DeleteItemInFeatureLayer' requires the property 'body' to be of type 'Array' but is of type 'String'.'



This happens even if I use a hardcoded objectid in a createArray() function. I have also tried several other ways, e.g. using an "Initialize variabel" creating an array, and then "Append to array variable" to ad the current item id. 

There is no log information in the underlying ArcGIS Server, and I think flow stops before sending a delete request to the service.

Any suggestions on what is wrong? Has anyone managed to delete features using this action?


mabjo_0-1726660373471.png

 

0 Kudos
2 Replies
cepsgis
Occasional Contributor

Having the same issue. My flow was a few weeks ago, but then as of yesterday I started getting an error like 'Could not obtain serverGen for: Hosted/MY_LAYER.' So I decided to try and run this workflow from a layer in SDE and now I'm getting 'OpenApiConnection'. Error details: 'The API operation 'CreateItemInFeatureLayer' requires the property 'body' to be of type 'Object' but is of type 'String'.

 

@SeanKMcGinnis, do you have an idea of why we would be experiencing this issue, added tidbit of information on our side we are running Enterprise 11.2

0 Kudos
cepsgis
Occasional Contributor

@mabjo , I just tried something and it seems to have worked, try throwing your data into an array first before going into your delete operation. When I just did that it allowed my operation to complete successfully. 

 

like so: @{array(outputs('Find_address_candidate')?['body/Geometry'])}

0 Kudos