I need some help figuring out the best process to go about selecting multiple unique values from a feature layer table.

136
5
Jump to solution
02-14-2020 07:43 AM
JamesB_MapDude
New Contributor

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?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DavidPike
MVP Frequent Contributor

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(...

View solution in original post

0 Kudos
5 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Do you want to Join the tables?

Join Field—Data Management toolbox | Documentation 

JamesB_MapDude
New Contributor

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. 

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

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

DavidPike
MVP Frequent Contributor

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(...

View solution in original post

0 Kudos
JamesB_MapDude
New Contributor

This worked fine! Thanks, guys!  A bit out of touch on the basics this Friday morning. . . . . 

Cheers!

0 Kudos