<?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: Problems accessing GlobalID from an arcpy.da.SearchCursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522572#M40964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Mike,&lt;BR /&gt;This is a bug and has been logged:&lt;BR /&gt;NIM084842:&amp;nbsp; Support GlobalID field type with arcpy.da.SearchCursor.&lt;BR /&gt;You can follow the status of this bug on support.esri.com.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which, nearly 12 months down the track, &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDg3MTI1"&gt;has no status update&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And as for just restricting the field to the GlobalID - that doesn't help. The example given above uses the old cursor (which didn't have this problem), not the new da version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We haven't tried 10.2 yet - can anyone verify this is still a problem? I presume from the (lack of) status update that it is.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Nov 2013 00:10:06 GMT</pubDate>
    <dc:creator>MalcolmParnell2</dc:creator>
    <dc:date>2013-11-05T00:10:06Z</dc:date>
    <item>
      <title>Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522569#M40961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to use a search cursor to query GlobalID values from a feature class or table using the arcpy.da module's search cursor class.&amp;nbsp; It seems, however, that this is not supported.&amp;nbsp; I have tried the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.da.SearchCursor(featureclass,["globalid"])
&amp;gt;&amp;gt;&amp;gt; row = cur.next()
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
RuntimeError: unsupported field type GLOBALID #11&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.da.SearchCursor(featureclass,["globalid@"])
&amp;gt;&amp;gt;&amp;gt; row = cur.next()
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
RuntimeError: A column was specified that does not exist. &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried all variations of letter cases (globalid, GlobalID, and GLOBALID), and it seems to make no difference.&amp;nbsp; I've tried requesting all fields for the feature class or table that I'm searching by providing ["*"] for the fields list, but the globalid field is not included in the resulting row data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following does work, however, if I use the non-'da' version of the SearchCursor class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.SearchCursor(featureclass)
&amp;gt;&amp;gt;&amp;gt; row = cur.next()
&amp;gt;&amp;gt;&amp;gt; row.globalid
u'{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}'
&amp;gt;&amp;gt;&amp;gt; row.getValue("globalid")
u'{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There doesn't seem to be any problem with a regular GUID type field...only with Global ID fields that have been added through the Add Global IDs geodatabse tool.&amp;nbsp; Is this a known limitation of the new data access module cursors, and/or is there some a more appropriate way to access global IDs through the arcpy.da module?&amp;nbsp; I don't really have a problem with using the other versions of the search cursors, but my interpretation from the documentation was that the cursors provided by the da module are more efficient...and this also makes me wonder if I should avoid querying Global IDs if there is a deliberate reason that they cannot be accessed with the new cursors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 20:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522569#M40961</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-11-30T20:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522570#M40962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a bug and has been logged:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NIM084842:&amp;nbsp; Support GlobalID field type with arcpy.da.SearchCursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can follow the status of this bug on support.esri.com.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 10:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522570#M40962</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-12-03T10:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522571#M40963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Until the bug w/ arcpy.da.SearchCursor is fixed, and since you are concerned about efficiency, you may want to modify the arcpy.SearchCursor code to limit the fields returned by setting the Fields option to limit the fields returned to the GlobalID:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&amp;gt;&amp;gt;&amp;gt; cur = arcpy.SearchCursor(featureclass, fields="GlobalID")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 20:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522571#M40963</guid>
      <dc:creator>TomWayson</dc:creator>
      <dc:date>2012-12-27T20:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522572#M40964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Mike,&lt;BR /&gt;This is a bug and has been logged:&lt;BR /&gt;NIM084842:&amp;nbsp; Support GlobalID field type with arcpy.da.SearchCursor.&lt;BR /&gt;You can follow the status of this bug on support.esri.com.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which, nearly 12 months down the track, &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDg3MTI1"&gt;has no status update&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And as for just restricting the field to the GlobalID - that doesn't help. The example given above uses the old cursor (which didn't have this problem), not the new da version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We haven't tried 10.2 yet - can anyone verify this is still a problem? I presume from the (lack of) status update that it is.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 00:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522572#M40964</guid>
      <dc:creator>MalcolmParnell2</dc:creator>
      <dc:date>2013-11-05T00:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522573#M40965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We haven't tried 10.2 yet - can anyone verify this is still a problem? I presume from the (lack of) status update that it is.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Malcolm,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using 10.2 the problem seems to be solved:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = 'name of fc in TOC'
cur = arcpy.da.SearchCursor(fc,["GlobalID"])
row = cur.next()
print row[0]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;returns:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:courier new;"&gt;{24CBF943-A07F-463E-AFFA-EB1AD760E29E}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:47:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522573#M40965</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T22:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522574#M40966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This doesn't appear fixed in 10.4.1 in 2017,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 16:39:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522574#M40966</guid>
      <dc:creator>MichaelAdornetto1</dc:creator>
      <dc:date>2017-04-11T16:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522575#M40967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have access to a 10.4.1 machine at the moment, but I just tested the code from &lt;A href="https://community.esri.com/people/xander_bakker"&gt;xander_bakker&lt;/A&gt;‌'s Nov. 5, 2013 comment using ArcGIS 10.5 and it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 17:41:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522575#M40967</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-04-11T17:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522576#M40968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird, I tested it again, using your code, &amp;nbsp;but it throws an exception in 10.4.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 21:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522576#M40968</guid>
      <dc:creator>MichaelAdornetto1</dc:creator>
      <dc:date>2017-04-11T21:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problems accessing GlobalID from an arcpy.da.SearchCursor</title>
      <link>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522577#M40969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Out of curiosity, what is the error message text?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 23:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problems-accessing-globalid-from-an-arcpy-da/m-p/522577#M40969</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-04-11T23:44:04Z</dc:date>
    </item>
  </channel>
</rss>

