Is there a way to save all of the features that are selected from a feature layer in selection mode to a new feature layer, geodatabase, or map to be displayed in the app?
Hi Cora,
I'm afraid there's currently no way in the Runtime SDK to create new FeatureLayers from scratch. If you're displaying the same layer again, and want to reselect the same features as were selected last time, then you could try persisting the ObjectIDs of the features returned from `FeatureLayer.getSelectedFeaturesAsync`, and then re-select them when the app restarts with `FeatureLayer.selectFeaturesAsync` (you'd have to build a query containing all the IDs).
Hope this helps some,
Shelly
Okay, thank you! Do you think I could do something similar by implementing the feature layer definition expression sample code? If I update the selected features on a field named "temp_selected" with the string attribute "selected" and then set that field and string to be the expression for the feature_layer like: feature_layer.setDefinitionExpression("temp_selected = 'selected'"). Could this work for displaying only those features that were selected on the map using the button on the bottom toolbar that is set up in the sample code?