Select to view content in your preferred language

How to use iteration output values to Select features

832
3
Jump to solution
08-27-2021 11:22 AM
REDARiahi
Emerging Contributor

Hi all! I'm new to model building and I need help...

I want to select features in order to delete them. The selection is based on the values of a column in a csv table. The idea is to iterate over the csv table rows (ITERATE ROW SELECTION) and use the output value to select features in the feature class. 

Is this something that can be done? If yes, how? If not, is there another way? 

 

Thank you!

 

0 Kudos
1 Solution

Accepted Solutions
DavidPike
MVP Frequent Contributor

Good stuff @REDARiahi , if you think it's a satisfactory solution to your initial question, please 'Accept as solution'.

View solution in original post

0 Kudos
3 Replies
DavidPike
MVP Frequent Contributor

I don't use model builder unfortunately so this may be unnecessarily involved.

Iterate Row Selection ->

use row output (green) as input to Get Field Value (specify the field name in the properties) ->

rename the Get Field Value output to something like attribute ->

Insert Select Layer By Attribute tool ->

In the Select by Attribute tool properties, write an expression such as 

youFieldName = '%attribute%'

Then connect your data to the Select by Attribute tool

0 Kudos
REDARiahi
Emerging Contributor

Thank you David! That worked! 

0 Kudos
DavidPike
MVP Frequent Contributor

Good stuff @REDARiahi , if you think it's a satisfactory solution to your initial question, please 'Accept as solution'.

0 Kudos