There's some good resources:
- Formula Operators and Functions
- Use Formula Fields && Advanced Formulas trailheads
- The
Build Formula
insert actions within the Process Builder (see below). By searching through the functions and clicking insert, you'll see the format for functions.
There's twothree things within your example that is off:
- Parenthesis - if you want all conditions met, make sure they're all within the
AND
function
AND (
..everything here...
)
- Email
Status
is a picklist field andCONTAINS
works on text. You'll need to convert the field value into text usingTEXT()
. - Your original formula used
CONTAINS
correctly (but your additions did not) and the same format/syntax applies even if using a field instead of a custom metadata value.
CONTAINS should be in the format of CONTAINS(text, compare_text)
. If that text is a field, then it's just CONTAINS(fieldName, compare_text)
.
AND(
$CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Bypassed__c,
CONTAINS($CustomMetadata.Process_Builder_Bypass__mdt.Email_Auto_Update_Provided_To_Customer.Profiles__c, $Profile.Name),
CONTAINS(TEXT([EmailMessage].Parent.Status), "TR/CR"),
CONTAINS([EmailMessage].Subject, "_TR_CR_")
)