Skip to main content
Hi,

 

 

I am working with a ESRI file geodatabase.

 

 

I would like to test if cetain field contains a specific value from a lookup table (in an ideal world this testing would not be required as this would have been mitigated agaist by using domains - however I am where I am!).

 

 

So essentially I have two tables, first my feature class: Roads_FC

 

 

pID],/RoadName],aRoadType]

 

1,High Street, Sealed Road

 

2,School Lane, Unsealed

 

3,Smith Road, Concrete Slabs

 

4,Jones Street, Sealed Road

 

5,Downy Street, Tarmac

 

6,Boris Street, Tarmac

 

 

My second table is a CSV 'FieldList' constructed as follows:

 

fFeatureClass],pField],rRoadTypeVaL]

 

Roads_FC,RoadType,Concreate Slabs

 

Roads_FC,RoadType,Sealed Road

 

Roads_FC,RoadType,Unsealed

 

Rivers,RiverType,Main River

 

Rivers,RiverType,Medium River

 

Rivers,RiverType,Small River

 

 

So I want a test that tells me that items 5 and 6 do not contain a conrrect value from my field list (i.e. "Tarmac" is not a valid value).

 

 

I can filter 'FieldList' easily using a 2 testers - first to filter by the feature class I am testing, and secondly by the field I am testing.  However I cannot work how to then check if the current row in my Roads Feature classe has one of my filtered values in 'FieldList'.

 

 

Can anyone help?

 

 

Regards,

 

 

Kevin

 

 

Hi,

 

 

To be able to test on both attributes and their values, you need somehow to merge/join the feature class and csv.

 

Hope this helps,

 

 

Itay
Hi Itay,   I think I managed to solve this one - I have run a test on two CSV files and it seems to have worked.   I used the Feature Merger transformer to get the result I wanted.    The data I actually had for my valid field values was in this format:   ÂFeatureClass],aField],eValues] Roads_FC,RoadType,Concreate Slabs; Sealed Road; Unsealed Rivers,RiverType,Main River; Medium River; Small River   Rather than:   FeatureClass],CField],FValue] Roads_FC,RoadType,Concreate Slabs Roads_FC,RoadType,Sealed Road Roads_FC,RoadType,Unsealed Rivers,RiverType,Main River Rivers,RiverType,Medium River Rivers,RiverType,Small River   This meant that I needed to filter the data first in FieldList.csv so I first used the Tester to filter on Roads_FC and RoadType field.  Then I used the AttributeSplitter and the ListExploder to get the values to pass into FeatureMerger.   Thanks for the pointer it helpped!   Regards,   Kevin
U can also create a list with listbuilder on Roads_FC,RoadType, listconcatenate on RoadType and then use a tester to do

 

@Value(ID.RoadName.eRoadType]) in @Value(Concatenated)

 

 

My coleague usualy does a lookup trough a joiner transformer b.t.w., wich is also a way to do it. This is primarily handy if u have external lookup-tables.

Reply