PRULAR Function: Difference between revisions
(Created page with "{{#seo: |title= PRULAR Function |titlemode=append |keywords=planfix, Templates, documents, functions, document templates, functions in document templates, PRULAR |description= PRULAR Function }}") |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
|description= PRULAR Function | |description= PRULAR Function | ||
}} | }} | ||
Used to append a suffix to a word or to change the word itself if it is an irregular noun based on the number given before it in the document template. | |||
== Format: == | |||
PLURALFORM (number; "text1"; "text2";) | |||
Depending on the calculated value of the number, the function selects one of two parameters. The parameters must be specified in strict order according to the algorithm. | |||
For example, you need to inflect the word "dollar." Follow the algorithm: | |||
First, write the required word with the number 1: | |||
*1 dollar | |||
This means that the first parameter in the function "should be the word "dollar" instead of "text1". | |||
Then, write the word with the number 2: | |||
*2 dollars | |||
This means that the second parameter in the function "should be the word "dollars" instead of "text2". | |||
Finally, you can specify the following PLURALFORM() function in the document: <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>PLURALFORM(SUM({{Datatag.Service.Cost}}*{{Datatag.Service.Quantity}}); "dollar"; "dollars")</nowiki></div> | |||
== Go To == | |||
*[[Standard functions]] | |||
Latest revision as of 12:28, 26 November 2025
Used to append a suffix to a word or to change the word itself if it is an irregular noun based on the number given before it in the document template.
Format:
PLURALFORM (number; "text1"; "text2";)
Depending on the calculated value of the number, the function selects one of two parameters. The parameters must be specified in strict order according to the algorithm.
For example, you need to inflect the word "dollar." Follow the algorithm:
First, write the required word with the number 1:
- 1 dollar
This means that the first parameter in the function "should be the word "dollar" instead of "text1".
Then, write the word with the number 2:
- 2 dollars
This means that the second parameter in the function "should be the word "dollars" instead of "text2".
Finally, you can specify the following PLURALFORM() function in the document: