NUMBERASWORDS Function: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 5: Line 5:
|description=NUMBERASWORDS Function
|description=NUMBERASWORDS Function
}}
}}
The function returns a number written out in words. Only the integer part of the number is converted; the fractional part is ignored.
== The NUMBERASWORDS function ==
== Format ==
This is a function that returns a number as words. Only the integer part of the number is written out.
  NUMBERASWORDS(number; OutputMode; "language")
 
Format:
  NUMBERASWORDS(number; Output; "language")


Where:
Where:
*'''number''' — a numeric value or a formula
*'''number''' — is a number or formula
*'''OutputMode''':
*'''Output''' — defines how the numeral will be displayed (from 0 to 6)
**0 — standard output
*'''language''' — string that specifies the output language. If left empty (""), the language of the user generating the document is used.
**1 — words in feminine gender
 
**2 — words in masculine gender
'''Languages''' and their '''Output''' methods:
**3 — words in neuter gender
*English ("en")
**4 — words in feminine gender, starting with a capital letter
**0-3 —  default (cardinal number)
**5 — words in masculine gender, starting with a capital letter
**4-6 — capitalized default
**6 — words in neuter gender, starting with a capital letter
 
*'''language'''
*German ("de")
**"" (empty) — uses the language of the user who is generating the document
**0 — default (gender-neutral)
**en english
**1 — written in feminine
**fr french
**2 — written in masculine
**de german
**3 — written in neuter
== Example ==
**4 — capitalized in feminine
To display a number in words a document, use a function like this:
**5 — capitalized in masculine
<div style="display: block; padding: 1em; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: black; word-wrap: break-word; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 4px;"><nowiki>NUMBERASWORDS(SUMM({{Task.Set price}}*{{Task.Amount}}); 0; "en")</nowiki></div>
**6 — capitalized in neuter
 
*French ("fr")
**0 —  default (cardinal number)
**1 written in feminine
**2 written in masculine
**4 capitalized in feminine
**5 capitalized in masculine
 
 
For example, to display a number as words in a document, use the following function:
<nowiki>NUMBERASWORDS(SUM({{DataTag.Service.Cost}}*{{DataTag.Service.Quantity}}); 2; "en")</nowiki>




== Go To ==
== Go To ==
*[[Standard functions]]
*[[Standard functions]]

Revision as of 11:55, 26 November 2025

The NUMBERASWORDS function

This is a function that returns a number as words. Only the integer part of the number is written out.

Format:

NUMBERASWORDS(number; Output; "language")

Where:

  • number — is a number or formula
  • Output — defines how the numeral will be displayed (from 0 to 6)
  • language — string that specifies the output language. If left empty (""), the language of the user generating the document is used.

Languages and their Output methods:

  • English ("en")
    • 0-3 — default (cardinal number)
    • 4-6 — capitalized default
  • German ("de")
    • 0 — default (gender-neutral)
    • 1 — written in feminine
    • 2 — written in masculine
    • 3 — written in neuter
    • 4 — capitalized in feminine
    • 5 — capitalized in masculine
    • 6 — capitalized in neuter
  • French ("fr")
    • 0 — default (cardinal number)
    • 1 — written in feminine
    • 2 — written in masculine
    • 4 — capitalized in feminine
    • 5 — capitalized in masculine


For example, to display a number as words in a document, use the following function:

NUMBERASWORDS(SUM({{DataTag.Service.Cost}}*{{DataTag.Service.Quantity}}); 2; "en")


Go To