<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Geoprocessing Service Input Never Changes in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410345#M10963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a simple geoprocessing service (for now) that I want to look at a feature class on my SDE, look at a specific row, count all the NULL values, then email me that number. I have it working like a champ in ArcMap and I even have the email working great when it's a service. The issue I'm running into is when I change the number of values that are NULL, the geoprocessing service seems to be looking at a copy of what was there when I first published it. So if I had 20 values that were NULL when I published it then went back and tweaked the data to be 10 values, when I run the service it will still email me that 20 are NULL values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't figure out if I'm referencing the data wrong in my geoprocessing script, or if there is something else I'm missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# hyperlinkPopulate.py
# Created on: 2016-07-01 08:54:14.00000
#&amp;nbsp;&amp;nbsp; (generated by ArcGIS/ModelBuilder)
# Description: 
# ---------------------------------------------------------------------------


# Import arcpy module
import arcpy
import smtplib


# Local variables:
CROOKADMIN2_DBO_cornersTest = "Database Connections\\CROOKADMIN2.sde\\CROOKADMIN2.DBO.grids\\CROOKADMIN2.DBO.cornersTest"
DBO_cornersTest_Layer = "DBO.cornersTest_Layer"


# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(CROOKADMIN2_DBO_cornersTest, DBO_cornersTest_Layer, "hyperlink IS NULL", "", "OBJECTID OBJECTID VISIBLE NONE;alpha alpha VISIBLE NONE;hyperlink hyperlink VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;township township VISIBLE NONE;range range VISIBLE NONE;numeric numeric VISIBLE NONE;lastedited_who lastedited_who VISIBLE NONE;lastedited_date lastedited_date VISIBLE NONE;Shape Shape VISIBLE NONE")


rows = arcpy.SearchCursor(DBO_cornersTest_Layer, fields="hyperlink")


numCorners = 0


# Iterate through the rows in the cursor and count the number of new records
for row in rows:
&amp;nbsp; numCorners = numCorners + 1
&amp;nbsp; #emailList.append(row.getValue("EMAIL"))


#A bit more stuff that doesn't matter&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's more that has to do with the emailing but doesn't matter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:38:31 GMT</pubDate>
    <dc:creator>LeviRoberts</dc:creator>
    <dc:date>2021-12-11T18:38:31Z</dc:date>
    <item>
      <title>Geoprocessing Service Input Never Changes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410345#M10963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a simple geoprocessing service (for now) that I want to look at a feature class on my SDE, look at a specific row, count all the NULL values, then email me that number. I have it working like a champ in ArcMap and I even have the email working great when it's a service. The issue I'm running into is when I change the number of values that are NULL, the geoprocessing service seems to be looking at a copy of what was there when I first published it. So if I had 20 values that were NULL when I published it then went back and tweaked the data to be 10 values, when I run the service it will still email me that 20 are NULL values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't figure out if I'm referencing the data wrong in my geoprocessing script, or if there is something else I'm missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# hyperlinkPopulate.py
# Created on: 2016-07-01 08:54:14.00000
#&amp;nbsp;&amp;nbsp; (generated by ArcGIS/ModelBuilder)
# Description: 
# ---------------------------------------------------------------------------


# Import arcpy module
import arcpy
import smtplib


# Local variables:
CROOKADMIN2_DBO_cornersTest = "Database Connections\\CROOKADMIN2.sde\\CROOKADMIN2.DBO.grids\\CROOKADMIN2.DBO.cornersTest"
DBO_cornersTest_Layer = "DBO.cornersTest_Layer"


# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(CROOKADMIN2_DBO_cornersTest, DBO_cornersTest_Layer, "hyperlink IS NULL", "", "OBJECTID OBJECTID VISIBLE NONE;alpha alpha VISIBLE NONE;hyperlink hyperlink VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;township township VISIBLE NONE;range range VISIBLE NONE;numeric numeric VISIBLE NONE;lastedited_who lastedited_who VISIBLE NONE;lastedited_date lastedited_date VISIBLE NONE;Shape Shape VISIBLE NONE")


rows = arcpy.SearchCursor(DBO_cornersTest_Layer, fields="hyperlink")


numCorners = 0


# Iterate through the rows in the cursor and count the number of new records
for row in rows:
&amp;nbsp; numCorners = numCorners + 1
&amp;nbsp; #emailList.append(row.getValue("EMAIL"))


#A bit more stuff that doesn't matter&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's more that has to do with the emailing but doesn't matter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410345#M10963</guid>
      <dc:creator>LeviRoberts</dc:creator>
      <dc:date>2021-12-11T18:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Input Never Changes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410346#M10964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what it looks like once published on server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Esri start of added imports
import sys, os, arcpy
# Esri end of added imports


# Esri start of added variables
g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,u'CROOKADMIN2.sde\\CROOKADMIN2.DBO.grids\\CROOKADMIN2.DBO.cornersTest')
g_ESRI_variable_2 = u'DBO.cornersTest_Layer'
g_ESRI_variable_3 = u'hyperlink IS NULL'
g_ESRI_variable_4 = u'OBJECTID OBJECTID VISIBLE NONE;alpha alpha VISIBLE NONE;hyperlink hyperlink VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;township township VISIBLE NONE;range range VISIBLE NONE;numeric numeric VISIBLE NONE;lastedited_who lastedited_who VISIBLE NONE;lastedited_date lastedited_date VISIBLE NONE;Shape Shape VISIBLE NONE'
# Esri end of added variables


# -*- #################
# ---------------------------------------------------------------------------
# hyperlinkPopulate.py
# Created on: 2016-07-01 08:54:14.00000
#&amp;nbsp; (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------


# Import arcpy module
import arcpy
import smtplib


# Local variables:
CROOKADMIN2_DBO_cornersTest = g_ESRI_variable_1
DBO_cornersTest_Layer = g_ESRI_variable_2


# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(CROOKADMIN2_DBO_cornersTest, DBO_cornersTest_Layer, g_ESRI_variable_3, "", g_ESRI_variable_4)


rows = arcpy.SearchCursor(DBO_cornersTest_Layer, fields="hyperlink")


numCorners = 0


# Iterate through the rows in the cursor and count the number of new records
for row in rows:
&amp;nbsp; numCorners = numCorners + 1
&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;MAIL"))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410346#M10964</guid>
      <dc:creator>LeviRoberts</dc:creator>
      <dc:date>2021-12-11T18:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Input Never Changes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410347#M10965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you publish it copies the connection file to local directory.&lt;/P&gt;&lt;P&gt;Is your connection windows or rdbms authentication? - the user that runs the service is different from your map.&lt;/P&gt;&lt;P&gt;Is the layer you try to access versioned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 04:49:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410347#M10965</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2016-07-03T04:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Input Never Changes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410348#M10966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mody,&lt;/P&gt;&lt;P&gt;The layer is versioned.&lt;/P&gt;&lt;P&gt;The connection is rdbms and the user in the in the connection files seems to match (unless I'm looking in the wrong spot).&lt;/P&gt;&lt;P&gt;Someone pointed me towards this thread &lt;A href="https://community.esri.com/thread/63178"&gt;Clear Workspace Cache in Python&lt;/A&gt;​, but not entirely clear on what he did.&lt;/P&gt;&lt;P&gt;Thanks for the help on this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 16:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410348#M10966</guid>
      <dc:creator>LeviRoberts</dc:creator>
      <dc:date>2016-07-06T16:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Input Never Changes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410349#M10967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turns out all I needed to do was include the Clear Workspace Cache tool at the beginning of my script. Now runs like a champ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Import arcpy module
import arcpy
import smtplib


# Local variables:
CROOKADMIN2_DBO_cornersTest = "Database Connections\\CROOKADMIN2.sde\\CROOKADMIN2.DBO.grids\\CROOKADMIN2.DBO.cornersTest"
DBO_cornersTest_Layer = "DBO.cornersTest_Layer"


# Process: Clear Workspace Cache
arcpy.ClearWorkspaceCache_management("")


# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(CROOKADMIN2_DBO_cornersTest, DBO_cornersTest_Layer, "hyperlink IS NULL", "", "OBJECTID OBJECTID VISIBLE NONE;alpha alpha VISIBLE NONE;hyperlink hyperlink VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;township township VISIBLE NONE;range range VISIBLE NONE;numeric numeric VISIBLE NONE;lastedited_who lastedited_who VISIBLE NONE;lastedited_date lastedited_date VISIBLE NONE;Shape Shape VISIBLE NONE")


rows = arcpy.SearchCursor(DBO_cornersTest_Layer, fields="hyperlink")


numCorners = 0


# Iterate through the rows in the cursor and count the number of new records
for row in rows:
&amp;nbsp; numCorners = numCorners + 1

# Process: Calculate Field
&lt;SPAN&gt;arcpy.CalculateField_management(DBO_cornersTest_Layer, "hyperlink", "'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=ftp%3A%2F%2FSurveys%3A*%40share.co.crook.or.us%2FMonuments%2F" target="_blank"&gt;ftp://Surveys:*@share.co.crook.or.us/Monuments/&lt;/A&gt;&lt;A class="jive-link-email-small" href="mailto:*@share.co.crook.or.us" rel="nofollow noopener noreferrer" target="_blank"&gt;*@share.co.crook.or.us&lt;/A&gt;&lt;SPAN&gt;/Monuments/' + !township! + !range! + !alpha! + '-' + !numeric! + '.pdf'", "PYTHON_9.3", "")&lt;/SPAN&gt;


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/geoprocessing-service-input-never-changes/m-p/410349#M10967</guid>
      <dc:creator>LeviRoberts</dc:creator>
      <dc:date>2021-12-11T18:38:37Z</dc:date>
    </item>
  </channel>
</rss>

