I'm trying to update values on a feature layer that is hosted on ArcGIS online. When I run the below code, nothing is updated but I do notice that the date modified changes to reflect the last time I run the code. Any ideas? I feel like it might have to do with settings/permissions on the hosted layer? I made sure editing was allowed and tried making it publicly shared as well. Any help is appreciated. Thanks
Francis,
Thanks Robert,
I've sort of obscured the URL just for privacy reasons. I am able to query, select and view all the data I need in the correct feature layer so I'm thinking that is not an issue unless I'm misunderstanding what you're saying a little bit. I'm not sure how to get a different link for my FeatureLayer I'm using the one listed on ArcGIS online.
In my scenario there are no null values and I'm only trying to change an already populated value to something else.
Thanks again for the help
Francis,
Is there more than one layer in this feature service?
Robert,
I figured it out. I had to change
query.outFields = ["haveData", "ISO",];
to
query.outFields = ["*",];
I guess that makes sense, as what I was feeding the applyEdits() didn't exactly match what I was trying to update.