Skip to main content
Question

Adding a value start of the attribute


Hi FME Experts,

 

I would like to add a specific value (03) start of the attribute to make the attribute digits 4.

 

EX:

origin value new value

78 0378

5 0035

.......

 

Thanks in advance!

3 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • July 5, 2019

You can concatenate character '3' and the original value then format it in four digits padded with zeros using the StringFormatter, as in:


  • Author
  • July 5, 2019
takashi wrote:

You can concatenate character '3' and the original value then format it in four digits padded with zeros using the StringFormatter, as in:

Thanks, @takashi your answer helps me, but what about if I have the original value already 4 digits ( in this case I don't need to add the "03" at start of the attribute


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • July 5, 2019
takashi wrote:

You can concatenate character '3' and the original value then format it in four digits padded with zeros using the StringFormatter, as in:

You can use the StringLengthCalculator to get the number of characters and use the Tester to filter out the feature if the number was 4 (or more).


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