function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dreamhomescrmdreamhomescrm 

Validation Rule on Short Text Box - Prevent users from writing in "Left Message"

Hello All,
 
I am trying to create a simple validation rule on our Leads tab that prevents a rep from writing "left message, voice mail, vm" in a short text field called "Quick Note". I am trying to use the CONTAINS text function but I´m not having much luck. Any ideas on how to solve this?
 
IF(CONTAINS( Quick_Note__c  , "left"), "Update Lead Status field please.")
 
Error Message:
Update Lead Status field to 1st, 2nd, or 3rd Attempt please. Left Message and Voice Message are just other contact attempts.
 
Should I use the FIND function . .  like this?
 
IF(FIND( "left",  Quick_Note__c  ) = 0), true value, false value
 
Thank you for your help.
 
 
 
 
dreamhomescrmdreamhomescrm
much easier than first thought . . .
 
OR( Quick_Note__c="left",Quick_Note__c="vm",Quick_Note__c="message")
dreamhomescrmdreamhomescrm

The answer above is great if you want to prevent the Quick Note field from being anything other than the keywords you have listed.

But if you want to only give an error when it contains keywords best to use OR and CONTAINS together . . .

OR( CONTAINS(Quick_Note__c,"left"),CONTAINS(Quick_Note__c,"vm"),CONTAINS(Quick_Note__c,"wn"),CONTAINS(Quick_Note__c,"Left"),CONTAINS(Quick_Note__c,"VM"),CONTAINS(Quick_Note__c,"WN"),CONTAINS(Quick_Note__c,"wrong"),CONTAINS(Quick_Note__c,"Wrong"),CONTAINS(Quick_Note__c,"wn"),CONTAINS(Quick_Note__c,"No Answer"),CONTAINS(Quick_Note__c,"No Ans"))