I am trying to use Select by Attributes within model builder. The input layer is a feature layer that is created.
My model fails on the Select By Attribute step with an error message saying that the specified field can not be found. This is the field that I have specified in the input layer.
Anyone know why this is?
Solved! Go to Solution.
One of the options as Curtis Price suggests is using the Copy Features—Help | ArcGIS Desktop tool. As for the output you can use "IN_MEMORY" as output workspace and ArcGIS will know that it needs to create the output in memory. See also Using in-memory workspace—Help | ArcGIS Desktop
The field you refer to... where is it and what is its name? Is it the actual field name or an alias.
Perhaps the whole error message would help
Here is the error message:
Start Time: Fri Apr 13 09:35:03 2018
ERROR 000358: Invalid expression
An expected Field was not found or could not be retrieved properly. ExcelToTable12_Features.Townlands]
Item not found in this collection.
Failed to execute (Select Layer By Attribute).
Failed at Fri Apr 13 09:35:03 2018 (Elapsed Time: 0.01 seconds)
Townlands is the field name within the feature layer
Is there a join involved in the process?
There is a join involved and I suspect that is the problem. The field I am querying "townlands" is from another table from a join.
Save the joined file to a new one as part of the process first... you can always delete at the end
I converted the feature kayer to an excel spreadsheet and then converted the excel spreadsheet to a .dbf. I can do a select on the .dbf and get the record im querying for.
Is there a simpler way to do this?
If the idea is to select by attributes, you can do this directly on the feature layer. No need to export to Excel and export from Excel to dbf.
Yes but the Select By Attributes is throwing the above error message if I do it on the feature layer.
Can you share a screenshot of your model?