SDRC00001
SDRC00002
.....etc
the sequential numbers at the end of the string come from another column.
What transformer do I use for the leading zeros and how do I do it?
cheers,
SDRC00001
SDRC00002
.....etc
the sequential numbers at the end of the string come from another column.
What transformer do I use for the leading zeros and how do I do it?
cheers,
Then use an AttributeCreator to merge the number (00001) with the text-attribute (SDRC)
just as an alternative to the StringFormatter, you can also use the StringPadder. I sometimes find the results a bit more predictable.
David
And also, PadLeft function from FME String Functions can be used in the AttributeCreator or the StringConcatenator. @Value(Prefix)@PadLeft(@Value(Number),5,0)
Here is a miserable cat to be skinned
Takashi
def FeatureProcessor(feature): attrib_to_trim = "MY_ATTRIBUTE" pad_width = 10 pad_char = "0" feature.setAttribute(attrib_to_trim, str(feature.getAttribute(attrib_to_trim)). rjust(pad_width, pad_char))
David