Skip to main content
Kofax

Leading Zeroes Stripped when using Number Format function

4814

Question / Problem:

Im my Validation Script I use a Format function to format a string that holds numbers. In the function I use a format string like "####" and I notice that it results in the leading zero(es) being stripped from the number.

How can I resolve this?

Answer / Solution:

You can use a Format string with "@" characters instead of "#" characters. Using the "#" character treats the value as a number, and if there are leading zeroes they will be stripped off. Using the "@" character will treat the value as a character or string, so a leading zero will have no significance and so wil not be stripped.

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0