The modify records task will change one or more features to a target layer.

The user must specify the target layer. The layer can be a layer in the web map or an externally referenced layer.

Changing the geometry of a set of features

// In this case only one feature is modified.
return [
  {
    feature: someFeature
    geometry: buffer(thisfeat, 10)
  }
];

Changing the attributes of a set of features

// In this case only one feature is modified.
return [
  {
    feature: someFeature
    // Only the attributes listed  will be replaced, 
    // all other attributes of the original feature 
    // will be preserved.
    attributes: {
      Status: "Operational"
    },
  }
];

Changing the attributes and geometry of a set of features

return [
  {
    feature: thisfeat,

    // Only the attributes listed  will be replaced, all other attributes of
    // the original feature will be preserved.
    attributes: {
      Status: "Operational"
    },

    // It also (optionally) possible to change the geometry as well
    geometry: buffer(thisfeat, 10)
  }
];