Function Signature
|
Description
|
Example
|
---|---|---|
INT(number)
|
Returns the integer part of the number. Returns 0 for invalid values.
|
1. To display the integer part of the field value.$F.INT($D.Service_Quote.SVMXC__Total_Line_Price2__c) returns 25 if the value of SVMXC__Total_Line_Price2__c is 25.x (e.g. 25.12, 25.5, 25.998, etc.).
2. To respect the configured function on the specific column header for all the lines, use this function.
{{$F.INT($D.Parts.SVMXC__Actual_Price2__c)}}
This returns 25 if the SVMXC__Actual_Price2__c is 25.x. This applies to all the lines displayed in the grid.
|
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 an 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 4 decimals.
|
Example :
1. LNUMBER without specifying scale will always by default add 4 decimals
{ {$F.LNUMBER($D.Work_Order.SVMXC__SM_Revised_Duration__c)} } ===> 120.0000
{ {$F.LNUMBER($D.Work_Order.SVMXC__Longitude__c)} } ===>876,798,765.9080
2. To display only the whole number, configure LNUMBER with scale 0
{ {$F.LNUMBER($D.Work_Order.SVMXC__SM_Revised_Duration__c, 0)} } ===> 120
{ {$F.LNUMBER($D.Work_Order.SVMXC__Longitude__c,0)} } ===>876,798,766
3. To display numbers with specific decimal places, configure LNUMBER with scale
{ {$F.LNUMBER($D.Work_Order.SVMXC__SM_Unscheduled_Duration__c,2)} } ===> 120.00
{ {$F.LNUMBER($D.Work_Order.SVMXC__Longitude__c,2)} } ===>876,798,766.90
4. To respect the configured function on the specific column header for all the lines, use this function.{{$F.LNUMBER($D.Parts.SVMXC__Actual_Price2__c,1)}}, when Scale=1
|
ROUND(number,num_digits)
|
Rounds a number to a specified number of digits.
Rounding is to the nearest value.
Note: ROUND function does only mathematical
rounding to the nearest value. However, if your
the requirement is to print the number to scale with
as many trailing zeros as needed, then the
the recommended option is to use LNUMBER function
with the scale option defined.
|
1. $F.ROUND($D.Service_Quote.SVMXC__
Total_Line_Price2__c,2) returns 25.51 if the
value of SVMXC__Total_Line_Price2__c is
between 25.510[x] and 25.514[x].
2. $F.ROUND($D.Service_Quote.SVMXC__
Total_Line_Price2__c,2) returns 25.52 if the
value of SVMXC__Total_Line_Price2__c is
between 25.515[x] and 25.519[x].
3. $F.ROUND($D.Service_Quote.SVMXC__
Total_Line_Price2__c,2) returns 25.5 if the
value of SVMXC__Total_Line_Price2__c is
between 25.495[x] and 25.504[x].
4. $F.ROUND($D.Service_Quote.SVMXC__
Total_Line_Price2__c,-2) returns 1900 if the
value of SVMXC__Total_Line_Price2__c is
between 1850.x and 1949.x.
5. To respect the configured function on the specific column header for all the lines, use this function.
{{$F.ROUND($D.Parts.SVMXC__Actual_Price2__c,1)}} when Scale= 1
The ROUND function returns output as NaN if input is blank . To return 0 for blank values configure function in this format {{$F.ROUND($D.Parts.SVMXC__Actual_Price2__c || 0,1)}}
|
SNUMBER(target_
object_alias,
number_
field_name)
|
Returns the number field value with the applicable
number of decimal digits, as defined for the
target object's field in Salesforce.
Note: If your requirement is to print the number
to scale with as many trailing zeros as needed
while also respecting the user's locale, then the
the recommended option is to use LNUMBER
function with the scale option defined.
|
1. $F.SNUMBER($D.Service_Quote,'SVMXC__
Total_Line_Price2__c') returns 146.500 if the
Total Line Price field value is 146.5, as the number
of decimal places defined for that field in
Salesforce is 3.
2. To respect the configured function on the specific column header for all the lines, use this function.
{{$F.SNUMBER($D.Parts,'SVMXC__Actual_Price2__c')}}
|