Select to view content in your preferred language

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

1312
5
Jump to solution
02-14-2020 07:43 AM
JamesBushOpelika
Occasional 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?

James Bush
jabush@opelika-al.gov
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 Emeritus

Do you want to Join the tables?

Join Field—Data Management toolbox | Documentation 

JamesBushOpelika
Occasional 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. 

James Bush
jabush@opelika-al.gov
0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
JamesBushOpelika
Occasional Contributor

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

Cheers!

James Bush
jabush@opelika-al.gov
0 Kudos