|
It is always recommended to use ServiceMax functions.
|
JavaScript Operators
|
ServiceMax Functions
|
Description
|
Formula with JavaScript Operators supported only in Classic SFM Delivery
|
Formula with ServiceMax Functions supported in Classic and Lightning SFM Delivery
|
---|---|---|---|---|
==
|
EQUAL
|
Equal to
|
$F.IF(($D.Work_Order.Number_Field_01__c==10),$D.Work _Order.Test_Number__c=900)
|
$F.IF($F.EQUAL($D.Work_Order.SVMXC__City__c,'Bangalore'), '100', $D.Work_Order.Test_Number__c)
|
!=
|
NOTEQUAL
|
Not equal
|
$F.IF(($D.Work_Order.Number_Field_01__c!=$D.Work _Order.Number_Field_02__c),$D.Work_Order.Test_Number __c=800)
|
$F.IF(($F.NOTEQUAL($D.Work_Order.Number_Field_01__c,$D.Work_Order.Number_Field_02__c)),800,$D.Work_Order. Test_Number__ c)
|
?
|
Ternary
|
Ternary
|
$F.IF($F.EQUAL($D.Work_Order.Install_Date__c,'true'),$D.
Work_Order.Install_Date_s__c?$D.Work_Order.Install_Date_s__c:$F.TODAY() , '')
|
$F.IF($F.EQUAL($D.Work_Order.Install_Date__c,'true'),$F.IF($D.Work_Order.Install_Date_s__c,$D.Work_Order.Install_Date_s__c,$F.TODAY()) , '')
|
>
|
GREATERTHAN
|
Greater than
|
$F.IF(($D.Work_Order.Number_Field_01__c>$D.Work _Order.Number_Field_02__c),$D.Work_Order.Test_Number __c=10000)
|
$F.IF($F.GREATERTHAN($D.Work_Order.Test_Number__c, 10.45), 10.45,$D.Work_Order.Test_Number__c)
|
<
|
LESSTHAN
|
Less than
|
$F.IF(($D.Work_Order.Number_Field_01__c <$D.Work _Order.Number_Field_02__c),$D.Work_Order.Test_Number __c=500)
|
$F.IF($F.LESSTHAN($D.Work_Order.Test_Number__c, 10.45), 10.45,$D.Work_Order.Test_Number__c)
|
>=
|
GREATERTHA NEQUAL
|
Greater than or equal to
|
$F.IF(($D.Work_Order.Number_Field_01__c =>$D.Work _Order.Number_Field_02__c),$D.Work_Order.Test_Number __c=90)
|
$F.IF($F.GREATERTHANEQUAL($D.Work_Order.Test_Number__c, 10.4), 10.5,$D.Work_Order.Test_Number__c )
|
<=
|
LESSTHANEQ UAL
|
less than or equal to
|
$F.IF(($D.Work_Order.Number_Field_01__c <=$D.Work _Order.Number_Field_02__c),$D.Work_Order.Test_Number __c=90)
|
$F.IF($F.LESSTHANEQUAL($D.Work_Order.Test_Number__c, 10.4), 10.5,$D.Work_Order.Test_Number__c )
|
&&
|
AND
|
AND
|
$F.IF(($D.Work_Order.Number_Field_01__c>10&&$D. Work_Order.Number_Field_02__c>10),$D.Work_Order.Test _Number__c=600)
|
$F.IF($F.AND($D.Work_Order.Number_Field_01__c>10,$D.Work_Order.Number_Field_02__c>10),$D.Work_Order.Test_Number__ c=600)
|
||
|
OR
|
OR
|
$F.IF(($D.Work_Order.Number_Field_01__c>10||$D. Work_Order.Number_Field_02__c>10),$D.Work_Order.Test _Number__c=600)
|
$F.IF($F.OR($D.Work_Order.Number_Field_01__c>10,$D.Work_Order.Number_Field_02__c>10),$D.Work_Order.Test_Number__ c=600)
|
!
|
NOT
|
NOT
|
$F.IF(! ($D.Work_Order.SVMXC__Customer_Down__c,'true'), $D.Work_Order.SVMXC__Billing_Type__c, 'Paid')
|
$F.IF($F.NOT($D.Work_Order.Number_Field_01__c>10,$D.Work_Order.Number_Field_02__c>10),$D.Work_Order.Test_Number__ c=600)
|
-
|
SUBTRACT
|
Subtraction
|
$D.Work_Order.Test_Number__c=$D.Work_Order.Number _Field_01__c-$D.Work_Order.Number_Field_02__c
|
$F.SUBTRACT($D.Work_Order.Number_Field_01__c,$D.Work_Or der.Number_Field_02__c)
|
+
|
ADD
|
Addition
|
$D.Work_Order.Test_Number__c=$D.Work_Order.Number _Field_01__c+$D.Work_Order.Number_Field_02__c
|
$F.ADD($D.Work_Order.Number_Field_01__c,$D.Work_Order.N umber_Field_02__c)
|
*
|
MULTIPLY
|
Multiplication
|
$D.Work_Order.Test_Number__c=$D.Work_Order.Number _Field_01__c*$D.Work_Order.Number_Field_02__c
|
$F.MULTIPLY($D.Work_Order.Number_Field_01__c,$D.Work_Ord er.Number_Field_02__c)
|
/
|
DIVIDE
|
Division
|
$D.Work_Order.Test_Number__c= $D.Work_Order.Number_Field_01__c/$D.Work_Order.Nu mber_Field_02__c
|
$F.DIVIDE($D.Work_Order.Number_Field_01__c,$D.Work_Order. Number_Field_02__c)
|