Skip to main content
So I have an attribute (TYPE)  that has several different values like WEST RAMP and GENERAL PARKING. I need a way to search that field and find values that contain "PARKING" or "RAMP" and map them appropriately. I was hoping to find a batch way of doing it since I have about 15 different destination values and would rather not have 15 StringSearchers. I thought about using a TestFilter but 15 output ports with AttributeSetter's isn't too clean.

 

 

Any thoughts? PythonCaller maybe?
Hi Sean,

 

 

If you are using FME 2013 SP1 or later version, consider using conditional mapping functionality of the AttributeCreator. See "FME 2013-SP1: Conditional Processing in FME".

 

Using that functionality, you can replace 1 TestFileter (having 15 output ports) and 15 AttributeCreators with only one AttributeCreator.

 

 

Takashi
You could use a string searcher to find the parts with a regular expression such as

 

 

(parking|ramp)

 

 

Then an attributevaluemapper on the matchedcharacters to set a new attribute (you may need a stringcasechanger inbetween depending on the data) 
Thanks for the feedback! Takashi's approach seems to be working out perfect! That is a nice bit of functionality that is in there.

 

 

-Sean

Reply