Solved

Tester not seeing attribute properly or at all. What am I doing wrong?

  • 19 October 2022
  • 2 replies
  • 7 views

Badge +1

A Tester: what could be simpler? I feel silly asking this, but I must. I have two sets of features, both resulting from reads from the same geodatabase (GDB). One set comes from a FeatureReader through the <Schema> port. The second set comes from a PythonCreator that uses fmeobjects/arcpy to create FME features having a few attributes containing schema information but not geometry. The plan is to run the two sets through a FeatureMerger to add the attributes of the second set to the first set. All well and good. Before sending all the features to the FeatureMerger, though, I wanted to remove from each set any features that have "OBJECTID," "SHAPE_AREA," or "SHAPE_LENGTH" values for a particular attribute. So, I send each feature set through its own Tester. The tests in each Tester are the same, except for the attribute name holding the tested value. The test is essentially if UpperCase(@Value(<attribute_name>)) = OBJECTID OR UpperCase(@Value(<attribute_name>)) = SHAPE_AREA OR UpperCase(@Value(<attribute_name>)) = SHAPE_LENGTH. I then output all features from the Failed port. Those ouput features should be all those that do not meet the test, i.e., those that I want to keep, am I correct?; however, the Tester isn't working as expected. For the first set, none of the features with a value of "OBJECTID" test True, so they are output. For the second set, none of the features test True, so no features are filtered out. I just don't get it.

 

The first feature set has features like the following:

image... and the Tester is configured like so:

imageThe second set has features like the following:

image... and the Tester for this set is configured like so:

imageThe name and AttributeName attributes are all completely populated (no Nulls/blanks), and the values have no leading or trailing white space. Yet, here is the result:

imageThe first Tester filters out 177 features, all with (upper case) values of SHAPE_AREA or SHAPE_LENGTH. The features with a value of OBJECTID are not filtered. The second Tester doesn't filter out any features. What gives?

 

I reeeally must get past this and move on. My deadline is upon me, so I greatly appreciate any suggetions anyone may have.

icon

Best answer by tomfriedl 19 October 2022, 17:16

View original

2 replies

Userlevel 1
Badge +12

Sometimes you write UpperCase and sometimes @UpperCase

Badge +1

Sometimes you write UpperCase and sometimes @UpperCase

Of course. Duh. (facepalm) Shoot me now. Thanks @tomfriedl​ 

Reply