JGBarclay

Determine which fields are editable within a Feature Layer

Discussion created by JGBarclay on Nov 13, 2013
Latest reply on Nov 14, 2013 by sendrr
I have created a new Feature Layer from a REST url.

Within a function, I would like to loop through the Feature Layer's fields and determine which fields are editable.

This information is available in the REST endpoint, but I can't seem to surface it via the JS API.

I have tried this:

flayer.queryFeatures(query, function(results) {
 array.forEach(results.fields, function(field){
  console.log(Object.keys(field));
 });
});


But the only field properties being returned are: name, alias, type and length.

Outcomes