I have a question...I am trying to update a specific field with the code below. I want to query all the data and change a field named "FLAGFIELD" to YES
I can get at the Portal ID for the Service and point to the correct table and set the proper JSON payload...
But I am missing where I am querying or selecting with a where clause of 1=1
Can anyone help with this part? How do I "Change ALL records to YES in the field FLAGFIELD"
Thanks
gis = GIS("https://xyz", "xyz", "xyz")
#currenttoken = gis._con.token
portal_item = gis.content.get('b373b127exxxxxxxxxx0dfb14a1')
ports_layer = portal_item.tables[0]
# We need to reconstruct json features to be updated
FLAGFIELDvalue = 'YES'
# construct json
add_data = {
"attributes" : {
"FLAGFIELD" : FLAGFIELDvalue,
}
}
# Push updates
add_updates = ports_layer.edit_features(updates = [add_data])