+ Start a Discussion
Leonard Silon 16Leonard Silon 16 

How do I get SFDC to recognize trailing spaces in criteria?

I have this code:
AND(
     ISPICKVAL(Origin , "Email"),
     OR(
        CONTAINS( Subject , "w9 "),
        CONTAINS( Subject , "w-9 "),
        CONTAINS( Description , "w9 "),
        CONTAINS( Description , "w-9 ")
        ),
     NOT(CONTAINS
)

When an email-to-case email comes in and the subject or description contains "W9" or W-9", then it needs to do actions. The issue is sometimes we get W9834834 or something like that. This should fail the criteria. You can see about I am looking for a space after the W( or W-9. However, the system is not recognizing the space being there and does the actions even if what it finds is W98435803

How can I get it to recognize the spaces?
Raj VakatiRaj Vakati
Can you try to use Reg exp .. I dnt have a formula but try to use regexp in formual and try