<?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: Selecting features based on similar names in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96475#M3936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Myretha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly use query to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that some of these link will be helpful&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//00s50000002t000000" title="http://help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//00s50000002t000000"&gt;ArcGIS Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf" title="http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf"&gt;http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;An arcpy/python way to find like named layers in a map document would be to use the string &lt;CODE style="padding: 1px 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; background-color: #eeeeee;"&gt;.find()&lt;/CODE&gt; method, see example below:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'207900045'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'xyz'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'1234'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; nameX &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; found &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;find&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;nameX&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; found &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;&amp;gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: maroon;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;append&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# next do something with two found layers in the foundLayers list....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Alternatively, you could do this in one line combining the if condition and in method:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="com" style="color: gray;"&gt;# same code as noted above before ListLayers statement&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonName &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;append&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# ....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Or, you could do this in one line using list comprehension:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="com" style="color: gray;"&gt;# same code as noted above before for nameX statement&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; nameX &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonName &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# next do something with two found layers in the foundLayers list....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2016 11:39:55 GMT</pubDate>
    <dc:creator>AbhishekRathi1</dc:creator>
    <dc:date>2016-02-26T11:39:55Z</dc:date>
    <item>
      <title>Selecting features based on similar names</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96474#M3935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am building a script to integrate into a model that iterates through data. I've been able to get two submodels to iterate through the original data and create large numbers of features in file geodatabase. One submodel creates point features the other creates polygons. I would like to select features (one point and one polygon) based on similar names from the file geodatabase. The point features are civic addresses that fall within a catchment area of each facility. The polygon is the 25 min drive time (service area) from each facility. The point ID of the facility has been integrated into the names of the points and the polygons.&lt;/P&gt;&lt;P&gt;I was hoping to select the features from the geodatabase based on the actual name of the feature class which contains the point ID as seen in the screen shot below. Ex: SA207900045_01 polygon the point ID is 207900045. The corresponding point file is nscafPL207900045_01. The point and polygon features do not contain the point ID information. I was hoping something could be done with 'list features' in python then 'select where' the names are the same but I'm having no luck finding this function. I want to be able to loop this selection. So I would select the point and polygon that have similar names then feed them into a tool in model builder then loop back and find another pair of point and polygon features and feed them into the tool.&lt;/P&gt;&lt;P&gt;Is there anyway to do this in python or model builder? I'm new to both. Below is an image of some sample data.&lt;/P&gt;&lt;P&gt;I'm using ArcGIS for desktop 10.2.2&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="187482" alt="PD_PL_Test.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/187482_PD_PL_Test.png" style="width: 620px; height: 572px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 19:45:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96474#M3935</guid>
      <dc:creator>MyrethaMcInnis</dc:creator>
      <dc:date>2016-02-24T19:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting features based on similar names</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96475#M3936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Myretha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly use query to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that some of these link will be helpful&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//00s50000002t000000" title="http://help.arcgis.com/En/Arcgisdesktop/10.0/Help/index.html#//00s50000002t000000"&gt;ArcGIS Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf" title="http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf"&gt;http://www.junipergis.com/files/5412/6870/0223/QueryBuilder.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;An arcpy/python way to find like named layers in a map document would be to use the string &lt;CODE style="padding: 1px 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; background-color: #eeeeee;"&gt;.find()&lt;/CODE&gt; method, see example below:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'207900045'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'xyz'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: maroon;"&gt;'1234'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; nameX &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; found &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;find&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;nameX&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; found &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;&amp;gt;-&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: maroon;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;append&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# next do something with two found layers in the foundLayers list....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Alternatively, you could do this in one line combining the if condition and in method:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="com" style="color: gray;"&gt;# same code as noted above before ListLayers statement&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonName &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;append&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# ....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Or, you could do this in one line using list comprehension:&lt;/P&gt;&lt;PRE class="lang-py prettyprint prettyprinted" style="margin-bottom: 1em; padding: 5px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #393318; background-color: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="com" style="color: gray;"&gt;# same code as noted above before for nameX statement&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; nameX &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonNames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; foundLayersList &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; commonName &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: black;"&gt;)]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: gray;"&gt;# next do something with two found layers in the foundLayers list....&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 11:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96475#M3936</guid>
      <dc:creator>AbhishekRathi1</dc:creator>
      <dc:date>2016-02-26T11:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting features based on similar names</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96476#M3937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/179334"&gt;Abhishek Rathi&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Thanks for your reply. Query builder wont work on feature names, as I mentioned the features have no attributes in common... in fact, the polygon only has basic attributes such as shape. They only way the polygon and point file are linked is by the string in their names. &lt;/P&gt;&lt;P&gt;I'm not sure I understand the examples you give and I would like to select the features from the file geodatabase, not the map doc.&lt;/P&gt;&lt;P&gt;Specifically, commonNames = ['207900045, 'xyz', '1234']. what is 'xyz' and '1234' referencing? and is there a way for it to automatically select the next feature name while ignoring the beginning of it's name?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 12:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/selecting-features-based-on-similar-names/m-p/96476#M3937</guid>
      <dc:creator>MyrethaMcInnis</dc:creator>
      <dc:date>2016-02-26T12:31:52Z</dc:date>
    </item>
  </channel>
</rss>

