This is a basic thing I should know how to do, but I am a bit rusty. I want to select some polygons in a table by many unique values. I have a .xls table with the values I need to pull. and a matching attribute field in my feature layer table. What is the best way to select these polygons from my feature table?
As Dan suggests, a table join would achieve this. You could also use a search cursor to append matching values to an empty list and then use select by attribute on the FL.
E.g. object_id_list = [1,2,3]
query = "OBJECTID in (1,2,3)"
Selectbyattribute(...
Do you want to Join the tables?
Join Field—Data Management toolbox | Documentation
I don't believe so? I do not want to add anything to my feature layer. I just want to select multiple fields from the feature table based on another spreadsheet.
If you want to select one with the other, then they need to be joined.... the features aren't relevant, the tables are. The are other "join" tools in the help topics that do similar things but the end result is the same... joined tables
This worked fine! Thanks, guys! A bit out of touch on the basics this Friday morning. . . . .
Cheers!
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.