String Functions - Output Documents
Function Signature
Description
Example
FORMAT(string_with_placeholders,parameter1 [,parameter2,…])
Takes a string with placeholders and the parameter values for each placeholder as the arguments and returns the formatted string after replacing the placeholders with the corresponding parameter values.
The parameter values can be field values or function values.
$F.FORMAT("Discount applicable is of type {0} and the value is {1}", $F.TOUPPER($D.Service_Quote.SVMXC__Discount_Type__c), $F.SNUMBER($D.Service_Quote,'SVMXC__Discount__c')) returns the string "Discount applicable is of type AMOUNT and the value is 4.0000", when Discount Type is Amount and Discount is 4.
LNUMBER(number[,scale])
Formats a number as per the logged in user's locale settings. In Online, this is the Locale value in the User record. In mobile apps, it is the device locale or the locale supported by the app.
You can also specify scale as optional argument in LNUMBER to be used for printing numeric values.
This is supported for number, percent, and
currency fields, in both header and lines sections.
Valid values for specifying scale are positive numbers, negative numbers, 0, and any numeric field value. If the optional argument is not specified or is set to an invalid value, the numeric value will be printed with any trailing zeros suppressed.
1. Example without specifying scale in LNUMBER:
$F.LNUMBER($D.Service_Quote.SVMXC__Total_Line_Price2__c) returns 1 234 567,089 for French and 1,234,567.089 for English (United States) locales.
2. Example with specifying scale in LNUMBER:
{{$F.LNUMBER($D.Service_Quote.SVMXC__Total_Line_Price2__c,2)}} returns 15,678.23 for English (United States) locale. if the value of Service_Quote.SVMXC__Total_Line_Price2__c is 15,678.231.
TOUPPER(text)
Converts all letters in the text
to uppercase.
$F.TOUPPER($D.Service_Quote.SVMXC__Discount_Type__c)
returns AMOUNT or PERCENT, depending on the value of Discount Type field.
WORD_BREAK(Text, MaxCharInLine, WordSplitIndicator)
Enables long text strings to have breaks so that they are not truncated.
$F.WORD_BREAK($D.Work_Order.SVMXC_Problem_Description_c, 80, '-')
Was this helpful?