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??
Looking at the image you posted while I see the name of the layer I'm not seeing a full reference path like 'C:\Data\...' or 'https://www.testmaps.myorg.com/...'. It looks like you are referencing a local dataset instead of the hosted service in ArcGIS Online that you are trying to write to. I would start by trying changes there and specifying the output location for where you want it to be.
yes..Is it necessary to write the full layer path? because the script runs correctly in arcmap..and if I should write the full path what would be the path of an sql database (because my database is an sql enterprise database) , would it be for example "myPC\SQLEXPRESS\Mydatabase\myLAYER" ??
Should I have a "start editing" code in my script? like
edit = arcpy.da.Editor("C:\Users\Maestro621\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog\GeopDB.sde")
I tried it and worked in arcmap but in web appbuilder it says "error in the location "C:\Users\Maestro621\AppData\Roaming\ESRI\Desktop10.3\ArcCatalog\GeopDB.sde")
Thank you Michelle, I am sorry I know I bother you with my questions but it's just the only problem remaining, I did pass all previous problems..Thank you and I will consider using the REST URL and I will let you know if that works.