Skip to main content
Solved

Can Attribute Manger Strip leading Zeros from Text field?

  • May 8, 2018
  • 2 replies
  • 131 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

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

The AttributeTrimmer can strip leading 0s.

 

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


takashi
Celebrity
  • 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.