Conditional Functions
Function Signature
Description
Examples
IF(logical_test, value_if_true, value_if_false)
Checks whether a condition is true, and returns one value if TRUE and another value if FALSE.
Target Field: Work Order > Billing TypeRequirement: Leave Billing Type unchanged if Customer Down is checked; else, set it to Paid.
Formula:
$F.IF($F.EQUAL($D.Work_Order.SVMXC__Customer_Down__c,'true'), $D.Work_Order.SVMXC__Billing_Type__c, 'Paid')
AND(logical1,logical2,..)
Checks whether all arguments are true and returns TRUE if all arguments are true
Target Field: Work Order > Billing TypeRequirement: Leave Billing Type unchanged if Customer Down is checked AND Order Status is Open AND Order Type is Field Service; else, set it to Paid.Formula:
$F.IF($F.AND($F.EQUAL($D.Work_Order.SVMXC__Customer_Down__c, 'true'), $F.EQUAL($D.Work_Order.SVMXC__Order_Status__c, 'Open'), $F.EQUAL($D.Work_Order.SVMXC__Order_Type__c, 'Field Service')), $D.Work_Order.SVMXC__Billing_Type__c, 'Paid')
OR(logical1,logical2,..)
Checks whether any of the arguments are true and returns TRUE or FALSE. Returns FALSE only if all arguments are false
Target Field: Work Order > Billing TypeRequirement: Leave Billing Type unchanged if Customer Down is checked OR Priority is High OR Is PM Work Order is checked; else, set it to Paid.Formula: $F.IF($F.OR($F.EQUAL($D.Work_Order.SVMXC__Customer_Down__c, 'true'), $F.EQUAL($D.Work_Order.SVMXC__Priority__c, 'High'), $F.EQUAL($D.Work_Order.SVMXC__Is_PM_Work_Order__c, 'true')), $D.Work_Order.SVMXC__Billing_Type__c, 'Paid')
NOT(logical)
Changes FALSE to TRUE or TRUE to FALSE
Target Field: Work Order > Order Type Requirement: Set Order Type to Depot Repair if City is not Los Angeles and Is PM Work Order is not checked; else, leave Order Type unchanged.Formula: $F.IF($F.NOT($F.OR($F.EQUAL($D.Work_Order.SVMXC__City__c,'Los Angeles'), $F.EQUAL($D.Work_Order.SVMXC__Is_PM_Work_Order__c, 'true'))), 'Depot Repair', $D.Work_Order.SVMXC__Order_Type__c)
Was this helpful?