In the example Using the attribute inspector | ArcGIS API for JavaScript in this section:
map.on("click", function(evt) {
selectQuery.geometry = evt.mapPoint;
petroFieldsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) {
if (features.length > 0) {
//store the current feature
updateFeature = features[0];
map.infoWindow.setTitle(features[0].getLayer().name);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
}
else {
map.infoWindow.hide();
}
});
});
updateFeature is always the first feature found in the array. The rest of the code uses updateFeature in several ways. There is also an even listener for next, but how would you ever get to 'next' if you only ever have one feature you're dealing with in the first place?
In my project I may have points that are close to each other and I want to be able to step through all the selected features, not just the first one encountered. I'm not sure how to modify this example to deal with all selected features.
I'm not sure about the attribute inspector but in my app that uses the editor widget, it still gives me the record navigation buttons in the infoWindow's titlebar. I can't seem to get that to happen in the ESRI sample, though. Anyways, the infoWindow (ok, technically popup) does have method to advance to the next or previous selected item:
map.infoWindow.selectPrevious()
Hmm..
I don't feel like I need the entire Editor widget, but this is one of the first projects I've needed to edit a featureservice. I'm only adding points and they will have the same symbol, so I don't need TemplatePicker. I do need to be able to move points, add attributes and attachments. I don't think Editor has enough examples for all I suspect it will do for me.
I don't see a constant for POINT in the Editor documentation and I think that's odd. I wasn't sure how to get started with my project without it, so my focus has been on the AttributeInspector example.
The Attribute Inspector will handle navigating to the next feature for you if you have more than one feature selected. Here's a JSBin that shows this working.
JS Bin - Collaborative JavaScript Debugging
I've also attached the code because I've heard that some organizations block access to jsbin.