@Repeat (Formula Language)
Repeats a string a specified number of times.
Syntax @Repeat( string ; number ; numberchars )
Parameters
string
Text or text list. The string you want to repeat.
number
Number. The number of times you want to repeat string.
numberchars
Number. Optional. The maximum number of characters you want returned. @Repeat truncates the result to this number.
Return value
repeatedString
Text or text list. The string, repeated number times until numberchars (if specified) is reached.
Usage
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
The resultant string cannot be larger than 1,024 characters.
Examples
- This example returns HelloHelloHello.
@Repeat("Hello";3)
- This example returns ByeBy.
@Repeat("Bye";2;5)
- This example returns Great Month! Great Month! Great Month! in
the Comments field if the amount in the field named Sales is greater
than or equal to 100,000; otherwise it returns the string Good Month.
FIELD Comments:=@If(Sales>=100000;@Repeat("Great Month!";3);"Good Month");
- This example returns HelloHelloHello and ByeByeBye in a list.
@Repeat("Hello" : "Bye"; 3)