Skip to main content

I am using the AttributeManager to rename the field NAME_BODY to NAME. At the same time, I'm using the Conditional Value to input a new Attribute Value for the field NAME. What I'm trying to say is... if NAME_SUFFIX_CODE is 'HWY' and my NAME_BODY is 'Trans-Canada', the output value should be 'Trans-Canada Hwy'. This is what it looks like....

The Output Value that I've stated in the above image is definitely wrong and I'm having no luck researching the proper way to put this together (I can't even get @value(NAME_BODY) + ' Hwy' to work). What is the correct way of writing it so that I get the value of NAME_BODY with the string ' Hwy' at the end of it?

The ElseIF statement that I have for the Parameter Condition Definition, as shown in the image below, is basically doing the same thing as the one above. I am discluding all the values that I already took care of in the If statement by saying NAME_SUFFIX_CODE cannot be 'HWY'. So when FULL_NAME is 'E Hwy 3a on ramp' and the NAME_BODY is '3a', the output value should read 'Hwy 3a'. This is what it looks like...

This Output Value is also incorrect. What is the correct way of writing it so that I get the string 'Hwy ' before the value of the field NAME_BODY?

Please help me write a proper Output Value.

Thank you,

Jessey

Try performing it as two actions, renaming and then setting the attribute conditionally, e.g.

You will have to manually type the new attribute name to in the text editor and it will show in red but it will still work, e.g.

Often when using an attribute manager to perform multiple actions against an attribute they're not always carried out in the order anticipated which can lead to unexpected results


Try performing it as two actions, renaming and then setting the attribute conditionally, e.g.

You will have to manually type the new attribute name to in the text editor and it will show in red but it will still work, e.g.

Often when using an attribute manager to perform multiple actions against an attribute they're not always carried out in the order anticipated which can lead to unexpected results

That was the solution! I needed to break out the rename and the conditional statement into two separate attributemanager transformers. Great to know that I was writing the Output Value properly!

 

 

Thanks so much!

 

Jessey

 

 


Reply