TRUNCATEWORDS
Shortens text down to the number of words passed as the argument.
If the specified number of words is less than the number of words in the text, ... is appended to the text.
Categories: Text
Syntax
TRUNCATEWORDS(text, length, [ellipsis])
Examples
Example 1
Input
1
{
2
"my_action": {
3
"message": "Hello and welcome to Tines"
4
}
5
}
Formula
TRUNCATEWORDS(my_action.message, 3)
Output
"Hello and welcome..."
Example 2: An optional third argument controls the characters inserted if the text is truncated (instead of `...`):
Input
1
{
2
"my_action": {
3
"message": "Hello and welcome to Tines"
4
}
5
}
Formula
TRUNCATEWORDS(my_action.message, 3, " etc")
Output
"Hello and welcome etc"
Example 3: Setting the third argument to `""` prevents any text being inserted if the text is truncated:
Input
1
{
2
"my_action": {
3
"message": "Hello and welcome to Tines"
4
}
5
}
Formula
TRUNCATEWORDS(my_action.message, 3, "")
Output
"Hello and welcome"
Sample actions
Select an action to inspect
You can also click "Copy actions" and paste them in your Tines story to see how they work.