Partager via


Preserving leading zeroes in numerical constant value mappings

If you need to map a numerical value to a constant value and that constant value has leading zeroes, those zeroes will be parsed off.  For example, if want to map a numerical field to a constant value of 00000000115 and you enter a constant value in the mapping wizard, the transformation logic will truncate the leading zeroes.  This results in a constant value of 115 instead of the desired value.  There is a workaround for this behavior using the ReplaceAll() function.

For example you can map the numerical field as follows: =ReplaceAll(ABC0000000115, ABC, "").  This will result in a string being returned from the function: "0000000115".  When the transformation converts this string into a number, it will then preserve the leading zeroes.