<?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 ModelBuilder: Iterate Feature Selection can't handle grouping by joined fields? in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/modelbuilder-iterate-feature-selection-can-t/m-p/160741#M515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ryanstillman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Overview&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;: [indent]I have a points layer and a lines layer. There is a join on the points layer using its segment ID number(CID) with a field in the lines layer which contains the name of the line that is used in our databases. I set up a model using "Iterate Feature Selection" at the start of the model to group the points by the joined name field but I get &lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank" rel="nofollow noopener noreferrer"&gt;Error" rel="nofollow" target="_blank"&amp;gt;http://help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#//00vp00000005000230.htm]Error&lt;/A&gt;&lt;SPAN&gt; 000230 saying how the field could not be found or was not where expected and caused a bad SQL expression. If instead, I choose to group by the segment ID, it works with no problems. What is the deal with using that particular field?[/indent]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Log of Error in Action&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing (Iterate Feature Selection): IterateFeatureSelection EVERYTHING\ObsPointsFromTrails100m "RECofficalTrailsClippedMORE_Dissolved.Tr_Name #" false
Start Time: Wed Jun 18 16:08:42 2014
Executing (Make Feature Layer): MakeFeatureLayer EVERYTHING\ObsPointsFromTrails100m I_ObsPointsFromTrails100m_RECofficalTrailsClippedMORE_Dissolved.Tr_Name ""RECofficalTrailsClippedMORE_Dissolved.Tr_Name" = 'Alaska Basin'" # #
Start Time: Wed Jun 18 16:08:42 2014
ERROR 000230: Failed selecting with "RECofficalTrailsClippedMORE_Dissolved.Tr_Name" = 'Alaska Basin'
An expected Field was not found or could not be retrieved properly.
An expected Field was not found or could not be retrieved properly. [ObsPointsFromTrails100m]
Failed to execute (Make Feature Layer).
Failed at Wed Jun 18 16:08:42 2014 (Elapsed Time: 0.15 seconds)
Failed to execute (Iterate Feature Selection).
Failed at Wed Jun 18 16:08:42 2014 (Elapsed Time: 0.37 seconds)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;More Info&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[indent]The points file is called "ObsPointsFromTrails100m"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The lines file is named "RECofficalTrailsClippedMORE_Dissolved"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a series of lines along which I have points that are a consistent distance apart along each line segment. The lines have fields like NAME and LENGTH, the points only have OID, SHAPE, and CID, which appears to be a unique identifier for which segment that particular point is on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've joined their two attribute tables based on CID and NAME so I can avoid using the alphabetical rank of each group of points(the CID) and use the segment's NAME for other later things.[/indent]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Pictures&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[indent]This is what I wanted to work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34711[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this model section:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34712[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it didn't, so I ended up trying this, which did work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34713[/ATTACH][/indent]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Success Log&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing (Iterate Feature Selection): IterateFeatureSelection EVERYTHING\ObsPointsFromTrails100m "ObsPointsFromTrails100m.CID #" false
Start Time: Wed Jun 18 14:55:56 2014
Executing (Make Feature Layer): MakeFeatureLayer EVERYTHING\ObsPointsFromTrails100m I_ObsPointsFromTrails100m_ObsPointsFromTrails100m.CID ""ObsPointsFromTrails100m.CID" = 1" # #
Start Time: Wed Jun 18 14:55:57 2014
Succeeded at Wed Jun 18 14:55:57 2014 (Elapsed Time: 0.19 seconds)
Succeeded at Wed Jun 18 14:55:57 2014 (Elapsed Time: 0.39 seconds)
etc...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any enlightenment you can share will be gratefully appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:27:47 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T08:27:47Z</dc:date>
    <item>
      <title>ModelBuilder: Iterate Feature Selection can't handle grouping by joined fields?</title>
      <link>https://community.esri.com/t5/transportation-questions/modelbuilder-iterate-feature-selection-can-t/m-p/160741#M515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ryanstillman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Overview&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;: [indent]I have a points layer and a lines layer. There is a join on the points layer using its segment ID number(CID) with a field in the lines layer which contains the name of the line that is used in our databases. I set up a model using "Iterate Feature Selection" at the start of the model to group the points by the joined name field but I get &lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank" rel="nofollow noopener noreferrer"&gt;Error" rel="nofollow" target="_blank"&amp;gt;http://help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#//00vp00000005000230.htm]Error&lt;/A&gt;&lt;SPAN&gt; 000230 saying how the field could not be found or was not where expected and caused a bad SQL expression. If instead, I choose to group by the segment ID, it works with no problems. What is the deal with using that particular field?[/indent]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Log of Error in Action&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing (Iterate Feature Selection): IterateFeatureSelection EVERYTHING\ObsPointsFromTrails100m "RECofficalTrailsClippedMORE_Dissolved.Tr_Name #" false
Start Time: Wed Jun 18 16:08:42 2014
Executing (Make Feature Layer): MakeFeatureLayer EVERYTHING\ObsPointsFromTrails100m I_ObsPointsFromTrails100m_RECofficalTrailsClippedMORE_Dissolved.Tr_Name ""RECofficalTrailsClippedMORE_Dissolved.Tr_Name" = 'Alaska Basin'" # #
Start Time: Wed Jun 18 16:08:42 2014
ERROR 000230: Failed selecting with "RECofficalTrailsClippedMORE_Dissolved.Tr_Name" = 'Alaska Basin'
An expected Field was not found or could not be retrieved properly.
An expected Field was not found or could not be retrieved properly. [ObsPointsFromTrails100m]
Failed to execute (Make Feature Layer).
Failed at Wed Jun 18 16:08:42 2014 (Elapsed Time: 0.15 seconds)
Failed to execute (Iterate Feature Selection).
Failed at Wed Jun 18 16:08:42 2014 (Elapsed Time: 0.37 seconds)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;More Info&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[indent]The points file is called "ObsPointsFromTrails100m"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The lines file is named "RECofficalTrailsClippedMORE_Dissolved"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a series of lines along which I have points that are a consistent distance apart along each line segment. The lines have fields like NAME and LENGTH, the points only have OID, SHAPE, and CID, which appears to be a unique identifier for which segment that particular point is on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've joined their two attribute tables based on CID and NAME so I can avoid using the alphabetical rank of each group of points(the CID) and use the segment's NAME for other later things.[/indent]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Pictures&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[indent]This is what I wanted to work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34711[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this model section:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34712[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it didn't, so I ended up trying this, which did work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34713[/ATTACH][/indent]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Success Log&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing (Iterate Feature Selection): IterateFeatureSelection EVERYTHING\ObsPointsFromTrails100m "ObsPointsFromTrails100m.CID #" false
Start Time: Wed Jun 18 14:55:56 2014
Executing (Make Feature Layer): MakeFeatureLayer EVERYTHING\ObsPointsFromTrails100m I_ObsPointsFromTrails100m_ObsPointsFromTrails100m.CID ""ObsPointsFromTrails100m.CID" = 1" # #
Start Time: Wed Jun 18 14:55:57 2014
Succeeded at Wed Jun 18 14:55:57 2014 (Elapsed Time: 0.19 seconds)
Succeeded at Wed Jun 18 14:55:57 2014 (Elapsed Time: 0.39 seconds)
etc...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any enlightenment you can share will be gratefully appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:27:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/modelbuilder-iterate-feature-selection-can-t/m-p/160741#M515</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T08:27:47Z</dc:date>
    </item>
  </channel>
</rss>

