no feature is created from a model

1554
13
05-22-2020 08:06 AM
MedMZOURI
New Contributor III

Hy guys..I have created a python script and a model which creates a feature (a square) in a layer given X and Y coordinates of center. of the square...it works on Arcgis desktop so I published it as a geoprocessing service and added it as a custom widget on Web Appbuilder , and when I run it it runs without error ..But NO FEATURE is created in my layer..
I have checked everything is okay..my map is a feature layer uploaded in my arcgis server..editing is enabled , creating , deleting and deleting are enabled too..So where is the error??

Tags (2)
0 Kudos
13 Replies
MedMZOURI
New Contributor III

Can you tell me please in what stage in the python script should I be referencing my hosted layer's REST URL, because I tried to put the REST URL instead of the local path in "arcpy.da.Editor("https://services8.arcgis.com.......") and it turns error

0 Kudos
MichelleBrake
New Contributor III

Here are some resources to help you with what functions are available and referencing a service:

ArcGIS API for Python | Editing Features

ArcGIS API for Python | Updating features in a feature layer

Using Python to Write Features to a Feature Service

If things are still unclear are reading those I would recommend posting to a python specific group/community like ArcGIS API for Python‌ or Python‌ to get more targeted help. 

Thanks,

Michelle

geojobe.com

0 Kudos
MedMZOURI
New Contributor III

Thank you Michelle..so , what I understood from your answer is that the use of ArcgGIS API for python is essential..because so far I haven't used it , I've only used simple python scripts within ArcGis desktop then sharing them as Geoprocessing services.

0 Kudos
MichelleBrake
New Contributor III

Not necessarily. The issue you were running into was functions to make edits on services, not local data, and referencing services in the script. Those resources I provided where to help with the python functions for both as it is a bit different than working with local tasks and data. 

Thanks,

Michelle

geojobe.com

0 Kudos