<?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: make all of the data in fields uppercase in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475912#M37284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get to SDE feature classes through your connection file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="str"&gt;"C:\\Users\\&amp;lt;yourusername&amp;gt;\\AppData\\Roaming\\ESRI\\Desktop10.whatever\\ArcCatalog\\SDEConnection.sde"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 20:07:28 GMT</pubDate>
    <dc:creator>JeffWard</dc:creator>
    <dc:date>2015-05-21T20:07:28Z</dc:date>
    <item>
      <title>make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475911#M37283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
... fc = r'O:\path here...\Storm.gdb\Storm\JunctionBox'
... 
... desc = arcpy.Describe(fc)
... fields = desc.fields
... 
... for field in fields:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if field.Type == "String":
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc, str(field.name)) as cursor:
...&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; for row in cursor:
...&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; if row[0] == None:&amp;nbsp; # Check for "&amp;lt;Null&amp;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;&amp;nbsp; continue
...&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; else:
...&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;&amp;nbsp; any(x.islower() for x in row[0]) == True
...&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;&amp;nbsp; row[0] = row[0].upper()
...&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;&amp;nbsp; cursor.updateRow(row)
&lt;/PRE&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this code that I pieced together in the past with your help. But it references a specific feature class on my network. How can I get it to now reference my sql express geodatabase feature class instead? The feature class is in my mxd where I run this, so can I just reference the feature class within this current map document somehow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475911#M37283</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T21:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475912#M37284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get to SDE feature classes through your connection file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="str"&gt;"C:\\Users\\&amp;lt;yourusername&amp;gt;\\AppData\\Roaming\\ESRI\\Desktop10.whatever\\ArcCatalog\\SDEConnection.sde"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 20:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475912#M37284</guid>
      <dc:creator>JeffWard</dc:creator>
      <dc:date>2015-05-21T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475913#M37285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you drag a feature class from any source into the interactive Python window of ArcGIS Desktop, it will show you the path.&amp;nbsp; If the SDE connection file is in your "Database Servers" or "Database Connections" folder in ArcCatalog, the path will be relative to those folder, but the path will still be valid for the currently logged in user.&amp;nbsp; &lt;A href="https://community.esri.com/migrated-users/8249"&gt;Jeff Ward&lt;/A&gt;​ shows what a full path would look like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 20:10:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475913#M37285</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-05-21T20:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475914#M37286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put an r in front of that string and you won't have to escape all of the slashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14322409637593976 jive_macro_code jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14322409637593976"&gt;&lt;P&gt;r'C:\some\path'&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 20:42:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475914#M37286</guid>
      <dc:creator>JasonTipton</dc:creator>
      <dc:date>2015-05-21T20:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475915#M37287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was really excited about this idea. The first time I tried it, it worked like a charm. But now I get the error message, even though I am in an edit session:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 10, in &amp;lt;module&amp;gt;
RuntimeError: The requested operation is invalid on a closed state [Ozark.DBO.BoxCulvert][STATE_ID = 58]
&lt;/PRE&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475915#M37287</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475916#M37288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your exact syntax?&amp;nbsp; Your original syntax doesn't show any edit sessions.&amp;nbsp; The error message indicates you either havent started editing after creating the edit session or you haven't started an operation yet.&amp;nbsp; The help for arcpy.da.Editor has some really good examples.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 May 2015 16:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475916#M37288</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-05-23T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475917#M37289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it's sql express SDE geodatabase so I have to start editing because you can't make changes to it outside of an edit session but then I don't know why it's giving me the error message after that. I'm dragging and dropping the feature class from ArcCat to my python window. This code works great when it's in a file gdb. Is there more I have to change because it's in a sql express SDE geodatabase? Thanks.&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; import arcpy
... fc = r'Database Connections\DEFAULT@Ozark.sde\Ozark.DBO.Storm\Ozark.DBO.BoxCulvert'
... 
... desc = arcpy.Describe(fc)
... fields = desc.fields
... 
... for field in fields:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if field.Type == "String":
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc, str(field.name)) as cursor:
...&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; for row in cursor:
...&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; if row[0] == None:&amp;nbsp; # Check for "&amp;lt;Null&amp;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;&amp;nbsp; continue
...&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; else:
...&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;&amp;nbsp; any(x.islower() for x in row[0]) == True
...&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;&amp;nbsp; row[0] = row[0].upper()
...&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;&amp;nbsp; cursor.updateRow(row)
...&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;&amp;nbsp; 
... 
... &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475917#M37289</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T21:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475918#M37290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you not doing something like this in your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# start editing
edit = arcpy.da.Editor(DB)
edit.startEditing(False, False)
edit.startOperation()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475918#M37290</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2021-12-11T21:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475919#M37291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are running the script from ArcMap, then it should work with the edit session, however you are not referencing the "Layer" in the map, just pointing to it on disk, so that particular instance is not in an edit session!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the TOC rename the layer to something like "EditLayer"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the code, instead of pointing to the path on disk:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;fc = r&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;'Database Connections\DEFAULT@Ozark.sde\Ozark.DBO.Storm\Ozark.DBO.BoxCulvert'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6; color: #000000; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;fc = 'EditLayer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesnt work, you will have to use Arcpy.Mapping to point to the mxd, and then find the layer within the MXD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, as Neil Ayres has said, start an end the edit session in the code! (Then make sure you are not in an edit session in ArcMAP else the layer may be locked)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this makes sense and explains what is happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475919#M37291</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2015-05-26T15:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475920#M37292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I'm not. I didn't figure I had to since I manually start editing before I run the code. But after starting to read the help it looks like I need something like that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:14:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475920#M37292</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-05-26T15:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475921#M37293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I was originally pointing to it from the TOC also. That doesn't work either. So it's back to my original idea (left over from VBA days) where I thought I had to reference the layer in the mxd somehow. Like you mention. But instead of that I'm going to try and start and end the edit session in the code using the bit that Neil just showed me above. thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:20:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475921#M37293</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-05-26T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475922#M37294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So three people actually helped me answer this question as I had to look at the help for arcpy.da.Editor to copy the sample code there. Thank you for your help! Code that works below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import os

fc = 'Database Connections/DEFAULT@Ozark.sde/Ozark.DBO.Storm/Ozark.DBO.BoxCulvert'
workspace = 'Database Connections/DEFAULT@Ozark.sde'

#start an edit session. Must provide the workspace.
edit = arcpy.da.Editor(workspace)

#Edit session is started without an undo/redo stack for versioned data. So True for versioned data.
edit.startEditing(False, True)

#start edit operation
edit.startOperation()


desc = arcpy.Describe(fc)
fields = desc.fields

for field in fields:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if field.Type == "String":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc, str(field.name)) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&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; if row[0] == None:&amp;nbsp; # Check for "&amp;lt;Null&amp;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; continue
&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; else:
&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; any(x.islower() for x in row[0]) == True
&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[0] = row[0].upper()
&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; cursor.updateRow(row)


#stop the edit session
edit.stopOperation()

#Stop the edit session and save the changes
edit.stopEditing(True)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:03:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475922#M37294</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T21:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: make all of the data in fields uppercase</title>
      <link>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475923#M37295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If youre database is a SQL SDE, you can use a function and trigger to do this real-time as data is edited. A slight modification of &lt;A _jive_internal="true" href="https://community.esri.com/blogs/HackingArcSDE/2015/01/19/whats-the-word-enforcing-naming-standards"&gt;this SQL Code&lt;/A&gt; will do the trick, the modification being you'd have to alter the function to upper-case every character.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 14:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/make-all-of-the-data-in-fields-uppercase/m-p/475923#M37295</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2015-05-27T14:02:22Z</dc:date>
    </item>
  </channel>
</rss>

