PRULAR Function

From Planfix
Revision as of 12:28, 26 November 2025 by Dmitri (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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:

PLURALFORM(SUM({{Datatag.Service.Cost}}*{{Datatag.Service.Quantity}}); "dollar"; "dollars")


Go To