MetaTool > Help > Extraction > Format Number

060-780 MetaTool Format – Format Number

With the MetaTool Format Number rule, you can convert numbers and currency values to different formats.

For example, currency values can be formatted as “$100.25”, “100.25 USD” or “100.25”, etc…
Same with numbers, they can be formatted as “123000.5060”, “123,000.51”, “123’000.51”, etc…

01 Format Number – Add Rule

Format Number is defined in the MetaTool Extract tab.

Press the Add button and select Format – Number to add the format rule.

The Format Number Setup window opens.

02 Format Number – Setup

In our example we will make use of the CB MetaTool Keyword Doc Sep job. This job is automatically installed when you install CaptureBites MetaTool.

We will first extract the full text of the last page with an Advanced OCR rule and place the result in an index field called “Full Text Last Page”. Next we’ll find the Total Due from each document. Refer to the help pages of the Find Line with Mask / Words, Replace text and Find line with Line number for more details.

The result looks like this:
We will change the format of the Total Due value and convert to a format without currency symbol or digit separator so we can update a database with this value (typically databases expect numbers in their most basic representation).  We select the index field “Total Due” that holds the numeric value we want to change.

Optionally, we enter a description.

01 – Input format: Convert both decimal symbols: this option will convert both decimal symbols “.” and “,”. When disabled, the decimal symbol defined in the output format is used and numeric values with other decimal symbols will be ignored.

This option is enabled by default.

02 – Output format: here we select if our numeric value will be a Currency value or a Number.

1) Currency: enable the Currency option, to format currency values and press the Setup button to open the Currency Setup window.

Symbol: here we can enter the currency symbol for the output format, in our case it’s a dollar sign.

Decimal symbol: here we can enter the decimal symbol for the output format. The most frequently used symbols are “,” in Europe & Latin America and “.” in US, Canada, United Kingdom, South Africa, Australia, etc…

Digits after decimal: here we can enter the number of digits after the decimal symbol. For example, when setting 2 digits after decimal, then “$5” is converted to “$5.00” and “$5,5648” is converted to “$5.56”.

Digit grouping symbol: here we can enter the decimal grouping symbol. Some commonly used symbols are a period (“.”), a comma (“,”) and an apostrophe (“’”).

For example, “$25,000”, “25.000 €” and “£ 25’000” are popular ways to separate digit groups. We recommend against the use of a space as a digit group separator. In many cases, the back-end system does not support digit grouping symbols. Just make the digit grouping symbol value blank to disable digit grouping, like in “25000”.

Note: We recommend against the use of a space as a digit group separator. In many cases, the back-end system does not support digit grouping symbols. Just make the digit grouping symbol value blank to disable digit grouping, like in “25000”.

Positive/Negative format: here we can select from the drop down menu the placement of the currency symbol and the way negative numbers are formatted. The values in the drop down always show a $ sign if you specified another currency symbol. This is just for preview purposes and the final result of your rule will use the currency symbol you have specified in the setup.

Note: The values in the drop down always show a $ sign even if you specified another currency symbol like £ or . This is just for preview purposes and the final result of your rule will use the currency symbol you have specified in the setup.

2) Number: enable the Number option to format regular numbers.
Decimal symbol: here we can enter the decimal symbol. The most frequently used symbols are “,” in Europe & Latin America and “.” in US, Canada, United Kingdom, South Africa, Australia, etc…

Digits after decimal: here we can enter the number of digits after the decimal symbol. For example, when setting 2 digits after decimal, then “5” is converted to “5.00” and “5,5648” is converted to “5.56”.

Digit grouping symbol: here we can enter the decimal grouping symbol. Some commonly used symbols are a period (“.”), a comma (“,”) or an apostrophe (“’”).

For example, “25,000”, “25.000” and “25’000” are popular ways to separate digit groups. We recommend against the use of a space as a digit group separator.

Note: We recommend against the use of a space as a digit group separator. In many cases, the backend system does not support digit grouping symbols. Just make the digit grouping symbol value blank to disable digit grouping, like in “25000”.

Add leading zeros: enable this option to always format the output value with a minimum number of digits. If the number has fewer digits than the defined minimum, the missing digits will be filled with zeroes.

For example, with Digit before decimal set to “6”:

1 is converted to 000001
123456 stays 123456
3456 is converted to 003456
000123456 is converted to 123456
123456789 stays 123456789

03 – Example: here we can enter a number to test the number format.

03 Format Number – Result

So, with this input:
And this Format Number rule:
The final result will look like this:

Subscribe to our Newsletter


Please check the box below to agree to the privacy policy and continue *


NOTE: if you're experiencing trouble with submitting this form, please try again using another browser.