Skip to main content
Solved

Can Attribute Manger Strip leading Zeros from Text field?


chris_m
Participant
Forum|alt.badge.img+1

I have a workflow that reads a MS Access file and splits two attributes into two separate values each by means of two AttributeSplitter transformers. I then use the AttributeManager transformer to place the 4 new values into 4 new char attributes. I need to strip the leading zeros from two of these fields and was wondering if this could be done in AttributeManager? If not how could it best be done before the AttributeManager (the next step is to use AttributeManager to concatenate these values.

Best answer by takashi

Hi @chris_m, yes you can do that using the @TrimLeft function. e.g.

@TrimLeft(@Value(_attr),0)

See here to learn more about FME String Functions.

View original
Did this help you find an answer to your question?

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 8, 2018

The AttributeTrimmer can strip leading 0s.

 

The AttributeManager can be used with the @TrimLeft(string, 0) function.


takashi
Evangelist
  • Best Answer
  • May 8, 2018

Hi @chris_m, yes you can do that using the @TrimLeft function. e.g.

@TrimLeft(@Value(_attr),0)

See here to learn more about FME String Functions.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings