Skip to main content
Question

Adding a value start of the attribute

  • July 5, 2019
  • 3 replies
  • 52 views

gisuser
Participant
Forum|alt.badge.img+4

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!

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.

3 replies

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


gisuser
Participant
Forum|alt.badge.img+4
  • Author
  • Participant
  • 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:

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
Celebrity
  • 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:

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).