<?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:  I cannot seem to get SelectLayerAttribute to work using Python? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456420#M35856</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code looks good. You mention other stuff also happens, perhaps your error is somehow there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try defining a feature layer in the script to see if that helps. (If you are running from desktop, it shouldn't make a difference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm"&gt;Make Feature Layer—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Nov 2019 10:24:24 GMT</pubDate>
    <dc:creator>LukeWebb</dc:creator>
    <dc:date>2019-11-25T10:24:24Z</dc:date>
    <item>
      <title>I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456418#M35854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't written a Python script in years...so this is my first one in a LONG time.&amp;nbsp; With that in mind the issue could be more than one issue...I'm not sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Python script almost working...just one more hurdle to complete and I'm ready to move on.&amp;nbsp; I'm running this script in ArcGIS Pro 2.4.2.&amp;nbsp; There is a sample feature class with 100 points, plus I created a list to extract values that will be passed to a "calc" function later.&amp;nbsp; The "list" I created was made using the Summary function in ArcGIS Pro, and I employ a cursor function as per below.&amp;nbsp; It too works really well and does what it's supposed to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this issue has me a little stumped, but I'm sure it's relatively easy to resolve...it could be a few different things, or it could be that Python isn't even capable to doing it they way I'm doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script does everything I want it to do except select the specific records in an attribute table.&amp;nbsp; I also have a CLEAR_SELECTION process that also runs immediately after this SelectLayerByAttribute string, but I don't know if it's doing anything either.&amp;nbsp; If I do this select manually it works without issue, but in a Python script it seems to have an issue.&amp;nbsp; Rather than select the specific group of records based on a unique identifier (MMSI) this SelectLayerByAttribute process selects the entire table for each iteration of the loop.&amp;nbsp; So when I calculate the field (in the next step) it just overwrites&amp;nbsp;everything that was&amp;nbsp;calculated in the previous iteration each time.&amp;nbsp; This process should update all of the blank fields/records found in the attribute table...and it too also works well manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So can anyone see what the issue might be here?&amp;nbsp; The code appears to be correct, so the does the syntax...what am I not seeing that will make this work properly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="376" src="https://community.esri.com/legacyfs/online/474368_pastedImage_1.png" width="919" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #800080; font-size: 22px; font-family: georgia, palatino, serif;"&gt;&lt;EM&gt;Thanks&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2019 21:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456418#M35854</guid>
      <dc:creator>Mark_Hotz</dc:creator>
      <dc:date>2019-11-20T21:39:41Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456419#M35855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/addfielddelimiters.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;AddFieldDelimeters&lt;/A&gt; function to rewrite a more suitable SQL query for the SelectByAttribute:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;sql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"""{0} = '{1}'"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddFieldDelimiters&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fcl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MMSI"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; recordl&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;l&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fcl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sql &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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456419#M35855</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2021-12-11T20:20:07Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456420#M35856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code looks good. You mention other stuff also happens, perhaps your error is somehow there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try defining a feature layer in the script to see if that helps. (If you are running from desktop, it shouldn't make a difference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm"&gt;Make Feature Layer—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2019 10:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456420#M35856</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2019-11-25T10:24:24Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456421#M35857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You better post code snippet, not an image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you ignore whatever result you get from &lt;CODE&gt;SelectLayerByAttribute_management&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;and later you do GetCount_Management on fc1 which is feature class string and it has not changed afyer your invoked SelectLayerByAttribute_management. Therefore you get count of all features in that feature class.&lt;/P&gt;&lt;P&gt;You should get both filtered layer and count (I guess a pair) as a result from SelectLayerByAttribute_management, so you don't need to call GetCount_Management at all, see Derived Output topic here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-attribute.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-attribute.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Select Layer By Attribute—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my experiment with IDLE in ArcMap 10.5&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; featureClass &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\DATA\Test-Attach\152287.gdb\Markanordningslinje'&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureClass&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'11673'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# I need to do this step in ArcMap, but you probably don't need it in Pro:&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"lyr"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'lyr'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# Now in ArcMap I have to do 2 steps:&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; res &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'NEW_SELECTION'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DTYPE='Stenmur'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;res&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'3267'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#.. but I think in Pro you can do like this and get count directly:&lt;/SPAN&gt;
out_layer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; count &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'NEW_SELECTION'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DTYPE='Stenmur'"&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;/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>Sat, 11 Dec 2021 20:20:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456421#M35857</guid>
      <dc:creator>RemigijusPankevičius</dc:creator>
      <dc:date>2021-12-11T20:20:10Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456422#M35858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'arial black', sans-serif; color: #008000;"&gt;Remigijus:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the feedback...it does help a lot and it's most appreciated.&amp;nbsp; I have never posted a snippet of code here before...so I will have to explore that further to see how it's done, and then use that next time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;I see where I made my mistake now.&amp;nbsp; I didn't pass the results of my select to a variable and then pass that to my calculate field command, nor did I pass the select result variable to my GetCount command.&amp;nbsp; I was probably thinking like I do when I do this manually using the Select tool and just assumed the results would magically happen :-).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the adjustments and the script now works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM style="font-family: georgia, palatino, serif; "&gt;Thanks again.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2019 18:49:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456422#M35858</guid>
      <dc:creator>Mark_Hotz</dc:creator>
      <dc:date>2019-11-25T18:49:44Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456423#M35859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'arial black', sans-serif; color: #008000;"&gt;Luke:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; It's always great when the community can help out.&amp;nbsp; I did narrow down the problem to that one specific Select command...but I still couldn't see exactly where the issue is.&amp;nbsp; However, as per below, a resolution was found.&amp;nbsp; You're right though...the code was good...except for one small oversight :-).&amp;nbsp; The script does indeed work now (and does exactly what I wanted it to do)...and that marks the first time in years where I have successfully written a arcpy script in ArcGIS (ArcGIS Pro in my case). This one script will save me days of work every time I need to run it (the manual alternative is both tedious and time consuming.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM style="font-family: georgia, palatino, serif; "&gt;Thanks again&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2019 18:56:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456423#M35859</guid>
      <dc:creator>Mark_Hotz</dc:creator>
      <dc:date>2019-11-25T18:56:29Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456424#M35860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'arial black', sans-serif; color: #008000;"&gt;FC Basson:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip.&amp;nbsp; I will explore this further and hopefully improve this current script (and future code too).&amp;nbsp; I have a few things to learn still, but I believe I'm making progress too.&amp;nbsp; There's writing code, and then there's writing code properly, so I'm always striving to improve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM style="font-family: georgia, palatino, serif; "&gt;Thanks again.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2019 19:00:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456424#M35860</guid>
      <dc:creator>Mark_Hotz</dc:creator>
      <dc:date>2019-11-25T19:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456425#M35861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My coding was "almost" right LOL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/476122_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I had neglected to add a variable to my SelecdtLayerByAttribute command, and then use that to display (print) how many records were selected and to then calculate the field.&amp;nbsp; I think I just thought that once selected then (just like it happens in ArcGIS/ArcGIS Pro) it automatically knows what I would have selected.&amp;nbsp; Now this works exactly how it should work.&amp;nbsp; It's slow, but it's going to run after midnight anyway, so it really doesn't matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks everyone for their help though...everything helped steer me in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 21:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456425#M35861</guid>
      <dc:creator>Mark_Hotz</dc:creator>
      <dc:date>2019-12-12T21:19:43Z</dc:date>
    </item>
    <item>
      <title>Re:  I cannot seem to get SelectLayerAttribute to work using Python?</title>
      <link>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456426#M35862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this will work for pasting code...&lt;IMG alt="How to quote code in geonet" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/476233_code-in-geonet.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Dec 2019 17:32:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-cannot-seem-to-get-selectlayerattribute-to-work/m-p/456426#M35862</guid>
      <dc:creator>RemigijusPankevičius</dc:creator>
      <dc:date>2019-12-14T17:32:44Z</dc:date>
    </item>
  </channel>
</rss>

