We are trying to develop a custom form application to edit the attribute tables in our Feature Access service (it contains 1 feature class and 8 related tables with M-N relationships)
Using the example in esriRequest we were able to get both the "FeatureLayer" class and the 8 "Table" classes, my question is, how can I retrieve the records from these to display in a drop down list for example?
Code was used from this tutorial : Retrieve data from a web server | Guide | ArcGIS API for JavaScript 3.17 using Json
Then I changed the RequestSuceeded to get the data type
function requestSucceeded(data) { alert(data.type) // prints "FeatureLayer" for feature class and "Table" for related tables }
Another question, is there a better way to retrieve classes from services other than creating a new esriRequest for each class?
Samuel,
You can use the QueryTask and Query classes to retrieve the data from your services.
Thanks as always Robert
Do I perform the query on the service or on the classes returned by the response?
Samuel,
On the service itself. An esriRequest does not return any classes it just returns json.