1. Docs
  2. Formulas
  3. Functions

PLURALIZE

Outputs the singular or plural version of text based on the value of a number.

Categories: Text

Syntax

PLURALIZE(counter, text, [plural_text])

Examples

Example 1

Input

1
{
2
"my_action": {
3
"message": 2
4
}
5
}

Formula

PLURALIZE(my_action.message, "item")

Output

"items"

Example 2

Input

1
{
2
"my_action": {
3
"message": 1
4
}
5
}

Formula

PLURALIZE(my_action.message, "item")

Output

"item"

Example 3: For custom pluralization, you can pass a third argument:

Input

1
{
2
"my_action": {
3
"message": 5
4
}
5
}

Formula

PLURALIZE(my_action.message, "bonus", "bonuses")

Output

"bonuses"

Sample actions

Event Transform
My Action
Event Transform
PLURALIZE

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Event Transform
My Action
Event Transform
PLURALIZE

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Event Transform
My Action
Event Transform
PLURALIZE

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?