Text Function

Description:
Applies the specified format to the expression or variable (source value), returning a text value.
How the format is applied is determined by the datatype of the source value:
  • Multi-line text values are punctuated where the format specifies the leading, penultimate and ultimate punctuation symbols; e.g. ", | and |."
  • List values are punctuated where the format specifies the leading, penultimate and ultimate punctuation symbols; e.g. ", | and |."
  • For boolean values the format specifies the true and false texts, separated by a vertical bar character; e.g. "Allow|Disallow"
  • For date values the format specifies which of the year, month and day components are included and how; e.g. "yyyy-mm-dd"
  • For time values the format specifies which of the hour, minute and second components are included and how; e.g. "hh12:mm ampm"
  • For number values the format specifies how the numeric value is presented; e.g. "CurrencyWords"
Returns:
Text
Parameters:
Parameter
Data Type
Description
1
Any
The source value.
2
Text
The format to be applied.
Examples:
When using functions inside a field, remember the field brackets:
{Text(ServicesIncluded, ", | and |.")}
Generic Expression
Result
Example taken from a Template
Text( List("a","b","c","d"), ", | and |." )
"a, b, c and d."
Text(ServicesIncluded, ", | and |.")
Text( Date(2000,2,29), "dd/mm/yyyy" )
"29/02/2000"
Text(DateAgreement, "dd/mm.yyyy")
Text( 1002304.5, "0,0.00" )
"1,002,304.50"
Text(LoanAmount, "0,0.00")
Text(0.5, "Fraction")
"One Half"
Text(InterestRate, "Fraction")
Text(0.063, "Fraction2/4/8)
"One Eigth"
Text(InterestRate, "Fraction2/4/8")
Text(3.1, "Fraction/10")
"Three and One Tenth"
Text(InterestRate, "Fraction/10")

Related content