<?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 Re: Replace() string function isn't working within Field Calculator and arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276047#M21331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing this within a session of ArcMap and am getting Runtime Error: Insufficient permissions to edit the feature class [STATE_ID = 207215] which is odd because I can edit and save outside of python.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Nov 2015 23:07:01 GMT</pubDate>
    <dc:creator>EugeneDurshpek</dc:creator>
    <dc:date>2015-11-23T23:07:01Z</dc:date>
    <item>
      <title>Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276039#M21323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to figure out what's wrong with my python syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an attribute table with 4 fields containing paths to media files. I'm trying to convert the paths so that they behave more like hyperlinks on our network. The existing paths (added to the tables via 3rd party proprietary software) include network drive i.e. M:\GraniteXP\...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use find and replace to replace "M:\GraniteXP" with "\\vancouver.root.local\...\GraniteXP".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do this perfectly fine using field calculator in ArcMap as well as Model Builder. However, when I export the model to Python; the script runs (successfully), but the values are not updated. There is not error to tell me what's failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a snippet from my script. I do have a MakeFeatureLayer prior to this snippet. (Note: this particular script is trying to change it back to the network drive pathing for testing purposes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.SelectLayerByAttribute_management("lyrsdePipeInsp", "NEW_SELECTION", "Photo1 is not null")&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("lyrsdePipeInsp", "Photo1", "Replace( [Photo1], \"\\\\vancouver.root.local\\cityapps\\GraniteXP\", \"M:\\GraniteXP\" )", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.SelectLayerByAttribute_management("lyrsdePipeInsp", "NEW_SELECTION", "Photo2 is not null")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management("lyrsdePipeInsp", "Photo2", "Replace( [Photo2],&amp;nbsp; \"\\\\vancouver.root.local\\cityapps\\GraniteXP\", \"M:\\GraniteXP\" )", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.SelectLayerByAttribute_management("lyrsdePipeInsp", "NEW_SELECTION", "Photo3 is not null")&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("lyrsdePipeInsp", "Photo3", "Replace( [Photo3], \"\\\\vancouver.root.local\\cityapps\\GraniteXP\", \"M:\\GraniteXP\" )", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.SelectLayerByAttribute_management("lyrsdePipeInsp", "NEW_SELECTION", "Video is not null")&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("lyrsdePipeInsp", "Video", "Replace( [Video], \"\\\\vancouver.root.local\\cityapps\\GraniteXP\", \"M:\\GraniteXP\" )", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Eugene Durshpek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276039#M21323</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-23T20:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276040#M21324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a pain with the double slash replacement, you could try replacement with "/"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; a = "c:\\path\\subpath\\file.tiff"
&amp;gt;&amp;gt;&amp;gt; b = a.replace("\\","/")
&amp;gt;&amp;gt;&amp;gt; b
'c:/path/subpath/file.tiff'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276040#M21324</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T13:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276041#M21325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a lot faster and easier to code this type of processing with an &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/data-access/updatecursor-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;update cursor&lt;/A&gt;​.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this would work for the code example you gave:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
fc = #the path to your feature class
with arcpy.da.UpdateCursor(fc&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;,["&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Photo1","&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Photo2","&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Photo3","Video"&lt;/SPAN&gt;&lt;/SPAN&gt;]) as update:&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in update:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] is not None:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = row[0].replace("\\vancouver.root.local\\cityapps\\GraniteXP", "M:\\GraniteXP")&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[1] is not None:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1] = &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;row[1].replace("\\vancouver.root.local\\cityapps\\GraniteXP", "M:\\GraniteXP")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[2] is not None:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[2] = &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;row[2].replace("\\vancouver.root.local\\cityapps\\GraniteXP", "M:\\GraniteXP")&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[3] is not None:&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;row[3].replace("\\vancouver.root.local\\cityapps\\GraniteXP", "M:\\GraniteXP")&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update.updateRow(row)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276041#M21325</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2021-12-11T13:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276042#M21326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not by chance a 64-bit? see below&lt;/P&gt;&lt;H5 class="icon-caution-cone" style="font-family: 'Avenir LT W01 65 Medium', Arial, Helvetica, sans-serif; font-weight: 500; margin-bottom: 0.63158em; padding-right: 1rem; padding-left: 0.5em; font-size: 0.875rem; color: #4d4d4d;"&gt;&lt;/H5&gt;&lt;H5 class="icon-caution-cone" style="font-family: 'Avenir LT W01 65 Medium', Arial, Helvetica, sans-serif; font-weight: 500; margin-bottom: 0.63158em; padding-right: 1rem; padding-left: 0.5em; font-size: 0.875rem; color: #4d4d4d;"&gt;Caution:&lt;/H5&gt;&lt;P style="font-size: 0.875rem;"&gt;Field calculations with a VB &lt;SPAN class="uicontrol" style="font-weight: bold;"&gt;Expression&lt;/SPAN&gt; type are not supported on 64-bit products, including &lt;SPAN class="ph"&gt;ArcGIS Pro&lt;/SPAN&gt;, &lt;SPAN class="ph"&gt;ArcGIS for Desktop&lt;/SPAN&gt;—&lt;SPAN class="ph"&gt;Background Geoprocessing (64-bit)&lt;/SPAN&gt; and &lt;SPAN class="ph"&gt;ArcGIS for Server&lt;/SPAN&gt;. To successfully use Calculate Field in these products, expressions should be converted to Python, or in the case of &lt;SPAN class="ph"&gt;Background Geoprocessing (64-bit)&lt;/SPAN&gt;, background processing can alternatively be disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/calculate-field.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/calculate-field.htm"&gt;Calculate Field—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276042#M21326</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-11-23T20:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276043#M21327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Luke, I will give this a try. I'm a novice and wasn't sure how to apply the update cursor function to my scenario. I appreciate your quick response.&lt;/P&gt;&lt;P&gt;Eugene D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:39:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276043#M21327</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-23T21:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276044#M21328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan. I will combine your suggestion with Luke's suggestion (below) and will hopefully have best of both worlds.&lt;/P&gt;&lt;P&gt;Eugene D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:41:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276044#M21328</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-23T21:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276045#M21329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we are running 64-bit OS. Thank you for the link. It's helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eugene D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:44:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276045#M21329</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-23T21:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276046#M21330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've got your find string and replacement string in the wrong order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("lyrsdePipeInsp", "Photo1", r'Replace( [Photo1],"M:", "\\vancouver.root.local")',"VB")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("lyrsdePipeInsp", "Photo1", r"!Photo1!.replace('M:', r'\\vancouver.root.local')", "PYTHON_9.3")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 21:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276046#M21330</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2015-11-23T21:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276047#M21331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing this within a session of ArcMap and am getting Runtime Error: Insufficient permissions to edit the feature class [STATE_ID = 207215] which is odd because I can edit and save outside of python.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 23:07:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276047#M21331</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-23T23:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276048#M21332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you working from an SDE geodatabase? In either case when I see this error I find that opening a &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000005000000" rel="nofollow noopener noreferrer" target="_blank"&gt;da Editor&lt;/A&gt;​ helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; arcpy&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;workspace = # path to you workspace&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;fc = &lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important;"&gt;# the path to your feature class&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;with arcpy.da.Editor(workspace) as edit:&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc,[&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"Photo1"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"Photo2"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"Photo3"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"Video"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;]) as update:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; update:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] = row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;].replace(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"\\vancouver.root.local\\cityapps\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"M:\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] = row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;].replace(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"\\vancouver.root.local\\cityapps\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"M:\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] = row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;].replace(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"\\vancouver.root.local\\cityapps\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"M:\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt; &lt;/SPAN&gt;&lt;SPAN class="special" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;None&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;] = row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;].replace(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"\\vancouver.root.local\\cityapps\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important;"&gt;"M:\\GraniteXP"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update.updateRow(row) &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276048#M21332</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2021-12-11T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276049#M21333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Luke;&lt;/P&gt;&lt;P&gt;Yes, I am editing an SDE feature class. I have updated my script (see below) but am now getting a "RuntimeError: cannot open workspace"; I will clean it up once I can get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
workspace = "M:/GIS/Support_Files/DataConnectionsADMIN/SewerVan_NT_SQLGIS1.sde/SewerVan.VANSEWER.SwrPipeInspected"
fc = "SewerVan.VANSEWER.SwrPipeInspected"
with arcpy.da.Editor(workspace) as edit:
&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc,["Photo1","Photo2","Photo3","Video"]) as update:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in update:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] is not None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = row[0].replace("//vancouver.root.local/cityapps/GraniteXP", "M:/GraniteXP")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[1] is not None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1] = row[1].replace("//vancouver.root.local/cityapps/GraniteXP", "M:/GraniteXP")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[2] is not None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[2] = row[2].replace("//vancouver.root.local/cityapps/GraniteXP", "M:/GraniteXP")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[3] is not None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = row[3].replace("//vancouver.root.local/cityapps/GraniteXP", "M:/GraniteXP")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update.updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:27:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276049#M21333</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2021-12-11T13:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276050#M21334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if there is an easy way to use the cursors in an ArcSDE geodatabase environment. You could look at this forum &lt;A href="http://gis.stackexchange.com/questions/119938/debugging-runtimeerror-workspace-already-in-transaction-mode-from-arcpy-da-upda"&gt;here&lt;/A&gt;​ that shows a work around. If you cannot get that figured out you may want to attempt&amp;nbsp; Luke Pinner's suggestion below. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 18:05:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276050#M21334</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2015-11-24T18:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Replace() string function isn't working within Field Calculator and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276051#M21335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply Luke. I have seen a bunch of suggestions to using the update cursor approach so I was trying to use that first. Unfortunately I haven't been able to get past some workspace and SDE issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as having my find string and replacement strings backwards; I do realize that. I've been calculating data back and forth while testing my script. At the moment my actual data reflects the successful field calculation with replace() that I ran with Model Builder. I'm trying to change it back with python and then I'll replace the order. (Hope that makes sense).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For whatever reason I just cannot get the VB syntax to work while editing an SDE layer. The script runs, and I get a little message saying that it ran successfully, but my data remains unchanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was finally able to use your syntax suggestion and make it work in a file geodatabase, which I end up appending to SDE to accomplish my final goal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 18:55:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/replace-string-function-isn-t-working-within-field/m-p/276051#M21335</guid>
      <dc:creator>EugeneDurshpek</dc:creator>
      <dc:date>2015-11-24T18:55:54Z</dc:date>
    </item>
  </channel>
</rss>

