My custom widget can read data from features but cannot edit them

79
6
05-25-2020 01:22 PM
Highlighted
New Contributor III

Hey guys..My custom widget can read data from features but cannot edit them (writing in a field, inserting a row) which means the widget can read but not modify the features fields..How can I make my widget write in fields and insert rows???   (in arcgis desktop the script runs correctly so it can modify features and insert row..but in arcgis online no)

Reply
0 Kudos
6 Replies
Highlighted
MVP Esteemed Contributor

Is your code using a featuresever url or a mapserver? Editing is only supported when using a featureserver url.

Highlighted
New Contributor III

Yes I am using a feature service layer..but in my code I'm using the local path of the layer  "C\ArcGIS\....." , should I use the url location "REST"?

Reply
0 Kudos
Highlighted
New Contributor III

Yes I am using a feature service layer..but in my code I'm using the local path of the layer  "C\ArcGIS\....." , should I use the url location "REST"?

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

OK. Let me check this. Do you know the difference between a FeatureLayer and a FeatureServer URL? Services in esri can come from a FeatureServer and a MapServer type url. You can use a FeatureServer or a MapServer endpoint in the url when you construct a FeatureLayer i code but the FeatureServer url will be the only one that allows editing. There is no using a local path...

Highlighted
New Contributor III

I am using a hosted feature layer (a shared it as a map service in my local server) and in my script I used the local path , and this works correctly in arcgis desktop (I can read and edit data) but in web appbuilder I can only read..In what stage in my script should I use the REST URL of the layer? because I tried using the Rest url instead of the local path but it turns an error (in arcgis desktop) I used it in  "arcpy.da.editor("https:// REST URL") 
I heard about using Arcgis API for python..Do i need it?

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Med,

   Your use of terms is really confusing. A Hosted feature layer means AGOL or on premise Portal and that would be a Feature Server Service (not a Map Service).

Next you are using python with I have no experience using so I need to let someone with Python experience answer.