Index
FormatNumberOnInput
Video Courses
Watch structured video courses
Knowledge Base
Visit our User Forum for discussions & solutions
FormatNumberOnInput - XpressDox
Although users can enter numbers with formatting according to their own region, often they enter numbers with no spaces or other punctuation. The FormatNumberOnInput command assists the user with readability of numbers on the interview. It does not affect the assembled document in any way.
Command structure:
«FormatNumberOnInput('#,###.##')»
This would apply to all number data elements in the template.
«FormatNumberOnInput(Loan_Amount,'#,###.##')»
This would apply to only the Loan_Amount data element.
Example of usage:
«FormatNumberOnInput(Loan_Amount,Deposit_Amount,'#,###.##')»
«FormatNumber(Loan_Amount)»
«FormatNumber(Deposit_Amount)»
«FormatDate(Installment_date,’mmmm d, yyyy’)»
When entered without using the FormatNumberOnInput, the numbers can prove to be difficult to read.

But when applying the FormatNumberOnInput to this interview there is a more readable outcome:

Types of formatting strings used in the command:
‘#,###.##’ means show a number if one was captured otherwise leave blank. Do not insert decimals if none have been captured. This is the format used in the pictured example.
‘#,###.00’ means show 0 even if no number was was captured. And insert .00 as decimals if no decimals were captured.
Formatting in your own locale:
It is important to note that the comma is an indication of the placement of the thousands delimiter. And the dot/full stop is the placement of the decimal. This does not necessarily mean that specifying the above formatting would result in a number such as 1,234.56.
If your locale is set to US/AU/UK then is what it would look like.
If it is set to ZA/FR then it is likely it would look like 1 234,56.
If German, then 1.234,56
Should you want to test in another locale, then in the Desktop change your language to a different locale by clicking Settings-> Language. And also Settings->Interview Number Format->User Chosen Language.
If you are testing in a browser, then changing the browser language will force the number to be formatted according to that locale.
Notes:
To apply formatting to the number in the document, use FormatNumber.
The FormatNumberOnInput command should appear before the data elements in the template. (See above snippet.)
Specify a FormatNumberOnInput() to apply to all data elements in the template, or use it per data element to specify a different formatting on a particular data element.