Skip to main content
Question

Selecting features by attribute

  • October 1, 2013
  • 3 replies
  • 369 views

Forum|alt.badge.img
Hi all,

 

 

I know this is a simple question, but I can't get it to work for some reason.

 

 

I want to take polygons that all have an School_ID and filter out the ones that have an ID not equal to 0...

 

 

I'm trying to use an AttributeFilter, but can't get it to work...

 

 

I have set the "Attribute to Filter By" to the SCHOOL_ID column.

 

 

...and set a "possible attribute value" to various values, including <> 0, <> "0", > 1, etc. to no avail.

 

 

I can get the tool to work if I set a possible value to a valid SCHOOL_ID, such as 263...then the resulting feature class has only that 1 feature in it.

 

 

Any thoughts appreciated!

 

 

Thanks,

 

 

-mb
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • October 1, 2013
Hi,

 

The attribute filter needs values found in the attribute you are using (school_id)

 

so if you set it to 0 all features with the attribute school_id = 0 will come out of that port and there rest in the undefined port.

 

Another option is to use the tester or testfter with school_id =! 0 which will result in all features where school_id is not 0.

 

Hope this helps,

 

Itay

Forum|alt.badge.img
  • Author
  • October 1, 2013
Well that is a fantastic implementation of an attribute filter!

 

 

Worked like a charm!

 

 

Many thanks!

 

 

-m

Forum|alt.badge.img
  • October 2, 2013
I agree with Italy, a tester might be a better option. Have you tried using the negate option in the tester? it is the check box to the right of the tester, Basically by checking that box the tester writes a different query:

 

 

  you see this once you hover over the ... on the transformer.