I'm new to ArcGIS javascript API, now I want to create a feature layer and then add an array of attributes or simply update the array of attributes of a specific field. I only need to replace the original values array as my own array. Is that possible?
There's a method: attr(name,value), Can I use this?
Can any one give me some hints or code? Thanks in advance!
[GIS] ArcGIS javascript API Update Records of a Feature Layer
arcgis-10.1arcgis-javascript-api
Best Answer
i'd start by taking a look at the sample below, which demonstrates the use of a widget that simplifies the process of passing attribute edits back to ArcGIS Server.
https://developers.arcgis.com/en/javascript/jssamples/ed_attribute_inspector.html
if you aren't interested in using one of the APIs widgets, you can also make your own calls to featureLayer.applyEdits()
https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#applyedits.