<?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: Searchcursor Returns only First Field in Field_Name List in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719025#M55679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your where expression is fine&lt;/P&gt;&lt;DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;objectIDList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;55555&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;44444&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
whereExp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"objectid IN {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;objectIDList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
whereExp
&lt;SPAN class="string token"&gt;'objectid IN (55555, 44444)'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but why are you only including 2 fields instead of using your 'fields' list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;da&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;SearchCursor&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;tableRegistry&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; whereExp&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;) current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="border-image-slice: 100%; color: #003000; white-space: pre; font-weight: inherit; border-image-width: 1; font-size: 100%; word-spacing: 0px; text-indent: 0px; font-family: inherit; orphans: 2; text-align: left; -webkit-text-stroke-width: 0px; border: 0px none currentColor; border-image-source: none; padding: 0px; margin: 0px; border-image-repeat: stretch; letter-spacing: normal; text-decoration: none; vertical-align: baseline; font-style: inherit; outline-color: invert; text-transform: none; font-variant: normal; outline-width: 0px; border-image-outset: 0; outline-style: none; "&gt;arcpy.da.SearchCursor(tableRegistry, fields, whereExp) maybe?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:46:51 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-12T06:46:51Z</dc:date>
    <item>
      <title>Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719023#M55677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings, I am running into a small problem. SearchCursor documentation states that search cursors can handle multiple field_names yet the below script only returns the first field name explicitly stated in the field_names parameter of the search cursor. If I use an asterisk, it returns the first field name in the list. I need it to return the location_id and lat and long attributes respectively from the view I am querying. Is it possible for a searchcursor to return more than one column / field?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;#Explicitly defined object IDs known to be conflated in conflation data model&lt;/SPAN&gt;
objectIDList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;55555&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;44444&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#small test&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#gets distinct location_ids&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getUniqueLocIDs&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
tableRegistry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;conn&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"myView"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'objectid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'longitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
whereExp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"objectid IN {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;objectIDList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 uniqueLocIDs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tableRegistry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereExp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uniqueLocIDs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;getUniqueLocIDs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719023#M55677</guid>
      <dc:creator>BenjaminBarton</dc:creator>
      <dc:date>2021-12-12T06:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719024#M55678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if the following helps:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;uniqueLocIDs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{0}, {1}, {2}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tableRegistry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
        &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereExp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719024#M55678</guid>
      <dc:creator>PavanYadav</dc:creator>
      <dc:date>2021-12-12T06:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719025#M55679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your where expression is fine&lt;/P&gt;&lt;DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;objectIDList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;55555&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;44444&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
whereExp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"objectid IN {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;objectIDList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
whereExp
&lt;SPAN class="string token"&gt;'objectid IN (55555, 44444)'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but why are you only including 2 fields instead of using your 'fields' list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;da&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;SearchCursor&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;tableRegistry&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; whereExp&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;) current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="border-image-slice: 100%; color: #003000; white-space: pre; font-weight: inherit; border-image-width: 1; font-size: 100%; word-spacing: 0px; text-indent: 0px; font-family: inherit; orphans: 2; text-align: left; -webkit-text-stroke-width: 0px; border: 0px none currentColor; border-image-source: none; padding: 0px; margin: 0px; border-image-repeat: stretch; letter-spacing: normal; text-decoration: none; vertical-align: baseline; font-style: inherit; outline-color: invert; text-transform: none; font-variant: normal; outline-width: 0px; border-image-outset: 0; outline-style: none; "&gt;arcpy.da.SearchCursor(tableRegistry, fields, whereExp) maybe?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719025#M55679</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T06:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719026#M55680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like using dictionaries:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;sourceFC &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"somefeature"&lt;/SPAN&gt;

sourceFieldsList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'longitude'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
whereExp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"objectid IN {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;objectIDList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

uniqueLocIDs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;r&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; r &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sourceFC&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sourceFieldsList&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; where_clause&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;whereExp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# { location_id: ( latitude, longitude), .... )&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719026#M55680</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T06:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719027#M55681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code will generate an IndexError because the tuple being returned from the search cursor only has 2 items.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:29:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719027#M55681</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-28T16:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719028#M55682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your problem lies in Line #8.&amp;nbsp; Instead of troubleshooting the line as written, what are you trying to achieve with that line?&amp;nbsp; You are creating a list from a set, so it appears you are looking for a list of unique items, correct?&amp;nbsp; If so, what defines uniqueness, location_id, latitude, or both?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:36:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719028#M55682</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-28T16:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719029#M55683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;End state is to retrieve location_id, lat and long by passing in a list of objectIDs but there exists a 1:M rel between location_ids and object ids (one location id can match to multiple objectIDs) in this non-normalized view I am querying. My result needs to be normalized so while I am using object id to match on to resolve distinct location_id keys, I don't necessarily need objectID in my result set. This leads me to believe that maybe I need to retrieve the normalized key structure as first pass to establish the normalized relational framework or key structure which the block of code I provided does do when just passing object_id in as the field param, and then query for my attributes using that returned key or keys in&amp;nbsp;a second pass with another search cursor, but before I get to that point, I just wanted to figure out why only one column in fields() returns, regardless of whether I provide an explicit list, use an asterisk (all) or&amp;nbsp;pass in 'fields' as the param. It just returns the first column of whatever is passed in as a param regardless of which method I use.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719029#M55683</guid>
      <dc:creator>BenjaminBarton</dc:creator>
      <dc:date>2019-02-28T16:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719030#M55684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I only have time at the moment to address:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I just wanted to figure out why only one column in fields() returns, regardless of whether I provide an explicit list, use an asterisk (all) or&amp;nbsp;pass in 'fields' as the param.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Your answer is:&lt;/P&gt;&lt;PRE class="language-python"&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"{0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The search cursor is returning everything you are asking, you are ignoring everything but the first column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2019 17:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719030#M55684</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-28T17:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719031#M55685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This did the trick. My apologies for only having latitude explicitly specified&amp;nbsp;as as one of the field parameters. it should have been:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tableRegistry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'longitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereExp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here is the final:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Returns exactly what I wanted it to&amp;nbsp;without having to do a second pass with a separate search cursor to pull in the attributes. For context, there are two object IDs (non-normalized) that match on&amp;nbsp;a conflated location_id I am returning (object IDs below are anonymized) but I only want one location_id (normalized) and the associated set of lat long coords returned:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;objectIDList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;55555&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;44444&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#small test&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#gets distinct location_ids&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getUniqueLocIDs&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
tableRegistry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;conn_hg&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"plc.plc.conflated_places_lv1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'objectid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'longitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
whereExp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"objectid IN {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;objectIDList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 uniqueLocIDs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{0}, {1}, {2}"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tableRegistry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'location_id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'latitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'longitude'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereExp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uniqueLocIDs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#getUniqueLocIDs()&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;getUniqueLocIDs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719031#M55685</guid>
      <dc:creator>BenjaminBarton</dc:creator>
      <dc:date>2021-12-12T06:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Searchcursor Returns only First Field in Field_Name List</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719032#M55686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;format parsing doesn't care what goes in as long as it is one object.&amp;nbsp; If you have more 'objects', then they would need to be separated by commas&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"stuff {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'stuff [1, 2, 3, 4]'&lt;/SPAN&gt;

&lt;SPAN class="string token"&gt;"stuff {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'stuff 1'&lt;/SPAN&gt;

&lt;SPAN class="string token"&gt;"stuff {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'stuff [2, 3, 4]'&lt;/SPAN&gt;

&lt;SPAN class="string token"&gt;"stuff {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'stuff [[1, 2, 3, 4], [5, 6, 7, 8]]'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-returns-only-first-field-in-field/m-p/719032#M55686</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T06:46:59Z</dc:date>
    </item>
  </channel>
</rss>

