Can you help me with my code below to delete/send multiple ObjectIDs to a delete parameter?
Currently the code just finds one record and send that Object ID to the delete paramter, but id like to be able to select a certain value in a attribute field and delete all or setup some sort of For or While Loop to pass all Object IDs to the delete paramter. One of the field names is 'Biologist' and a test record/value for the example is 'jah'.
from arcgis.gis import GIS
from IPython.display import display
gis = GIS(username="xxx", password="xx")
search_result = gis.content.search('test url')
search_result[1]
test_item = search_result[1]
test_layers = test_item.layers
test_layers
test_fset = test_layers[0].query()
test_fset.df
test_flayer = test_layers[0]
test_flayer.properties.capabilities
test_features = test_fset.features
remove_feature = [f for f in test_features if f.attributes['Biologist'] == 'jah'][0]
dele = remove_feature.get_value('OBJECTID')
delete_result = test_flayer.edit_features(deletes=str(dele))
delete_result