Update features in feature-services using "Send Web Request"

396
3
08-10-2023 12:40 AM
bogrevy
Esri Contributor

Is there a way to update attributes for features in a feature-service that meet specific criteria’s?

As I can see it, I need to:

  1. Send a web request using the Query operation (basically getting the features that meet the criteria)
  2. Modify the json received in step 1, (changing the attributes that should be changed)
  3. Send a web  request using the Update Features operation (using the modified json from step 2)

I can make step 1 work. I can also make step 3 work with a fixed json for the “features” parameter, but I don’t know how to receive the json from step 1 and modify it (step 2) and pass it on to step 3. Does anybody have an idea?

Are there other methods to update attributes for features in a feature-service that meet specific criteria’s?

I was thinking of making a GP-service and then use “Run GP Service”, but it seems like a clumsy and unnecessarily cumbersome method.

0 Kudos
3 Replies
RyanDickinson1
New Contributor III

Have you tried setting up the extended properties to the feature service and linking the attribute field you want to update? Then updating the job properties linked field with the modified attribute? I will need to test this as well. Are you able to get the configured outputs of the features from the query, $.features?

0 Kudos
PierreloupDucroix
Occasional Contributor II

Hello,

I am trying to update a feature service based on your proposition, but the Update Job Properties task tells me that only the linked field can be updated.

On the other hand, in the documentation, it is said that the linked field should contain unique values... So I don't understand how I can use that, or update that field from a job's attribute.

My use case -> after a survey has been recorded in a point layer at the beginning of the job, the user is asked to assign the job to someone else. Then I want to write the new job owner in a field in the survey's feature service.

0 Kudos
PalakPandey
New Contributor II

Hi bogrevy, 

 

I am using WFM 11.1. I am facing issue with Send Web request even for updating the feature attribute values. Could you please help me with a snippet of the parameters/syntax which is working for you. The same json input is working on ArcGIS rest endpoint. 

TIA

0 Kudos