Function Signature
|
Description
|
Example
|
---|---|---|
BOOL
(expression)
|
Checks whether an expression is non-null and
returns true or false. Checkbox field returns
false if it is unchecked. The numeric field returns
false if it is blank or 0.
|
1. $F.BOOL($D.Service_Quote.SVMXC__
Discount__c) returns true if Discount
is > 0 and false if it is 0 or blank. 2. Configure this function on the specific column header for all the lines to respect the configured function. This function returns False if the Actual Price has no value or is zero. {{$F.IF($F.BOOL($D.Parts.SVMXC__Actual_Price2__c),'True','False')}}
|
LNUMBER(number function)
|
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 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.
|
IF(logical_
test, value_
if_true,
value_if_
false)
|
Checks whether a condition is true, and
returns value_if_true if true and value_if_
false if false.
|
1. $F.IF($D.Service_Quote.SVMXC__Discount__ c && $D.Service_ Quote.SVMXC__Total_Line_Price2__c > 0, "Discount is applicable and the amount is payable", "No discount is applicable or no amount is payable"). The above condition returns the string "Discount is applicable, and the amount is payable" if Discount is > 0 and Total Line Price is > 0. Otherwise, it returns the string "No discount is applicable or no amount is payable". $F.IF ($D.Service_Quote.SVMXC__Discount__ c, $D.Service_Quote.SVMXC_ _Discount__c, 2.5) returns 2.5 if Discount is 0 or blank, and the Discount field value otherwise. For Picklist Fields:2. {{$F.IF($D.Work_Order.SVMXC__Billing_Type__c.label=== 'Paid', 'Bill Customer', 'FreeService')}}In this example, if the Work Order Billing Type value is equal to Paid, then Bill Customer is displayed, else Free Service is displayed in the Output Document.3. {{(function () {var oT = $D.Work_Order_TEST.SVMXC__Billing_Type__c.value; if (oT == 'Paid') return 'Bill customer Send Invoice '; else if (oT == 'Contract') return 'covered under contract'; else return 'Send Quote'})()}}In this example, the Billing Type picklist value comparison is done within a JS function.
|
ISNULL(expression)
|
Checks whether an expression is null and
returns true or false. Checkbox field returns
true if it is unchecked. The numeric field returns
true if it is blank or 0.
|
1. $F.ISNULL($D.Service_
Quote.SVMXC__Discount__c) returns
false if Discount is > 0 and true if it is
0 or blank. 2. Configure this function on the specific column header for all the lines to respect the configured function.
• {{$F.IF($F.ISNULL($D.Parts.SVMXC__Actual_Price2__c),'True','False')}}
• $F.IF($F.ISNULL(),'True','False')
|