NUMBERASWORDS Function: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
|description=NUMBERASWORDS Function | |description=NUMBERASWORDS Function | ||
}} | }} | ||
The function returns a number | == 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; | == Format: == | ||
NUMBERASWORDS(number; Output; "language") | |||
Where: | Where: | ||
*'''number''' — a | *'''number''' — is a number or formula | ||
*''' | *'''Output''' — defines how the numeral will be displayed (from 0 to 6) | ||
**0 — | *'''language''' — string that specifies the output language. If left empty (""), the language of the user generating the document is used. | ||
**1 — | |||
**2 — | '''Languages''' and their '''Output''' methods: | ||
**3 — | *English ("en") | ||
**4 — | **0-3 — default (cardinal number) | ||
**5 — | **4-6 — capitalized default | ||
**6 — | |||
* | *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 | |||
== Example == | == Example == | ||
To display a number in | To display a number as words in a document, use the following function: | ||
<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( | <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(SUM({{DataTag.Service.Cost}}*{{DataTag.Service.Quantity}}); 2; "en")</nowiki></div> | |||
== Go To == | == Go To == | ||
*[[Standard functions]] | |||
Latest revision as of 12:15, 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
Example
To display a number as words in a document, use the following function:
NUMBERASWORDS(SUM({{DataTag.Service.Cost}}*{{DataTag.Service.Quantity}}); 2; "en")