Solved

Complete field with 0 in the left


Badge +6

Hi,

 

I have some field (ID), but the values sometimes have one, two, three...digits. There is one attribute with number of the digits that previous may have. For example the value (ID) is 10 and the number of digits may have 5, so the value is 00010. If the value (ID) is 1555, the value become 01555.

 

How to put 0 in the left to complete the digits of fields?

 

How do that?

 

Thank´s

 

icon

Best answer by david_r 16 May 2023, 08:35

View original

3 replies

Userlevel 4
Badge +36

Use the @PadLeft function in an AttributeManager or AttributeCreator, of use the StringPadder transformer.

PadLeft

Userlevel 4

Or use the StringFormatter, with e.g. "05s" as the format string.

Badge +6

Use the @PadLeft function in an AttributeManager or AttributeCreator, of use the StringPadder transformer.

PadLeft

Very Good, thank´s for your attention!

Reply