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
frasuyetfrasuyet 

Validation Rule Using BEGINS and TEXT Functions

I'd like to create a validation rule that prevents a user from saving a task with a type of "email" when the subject of the task does not begin with "email". The subject and type are native activity fields -text and picklist data types respectively.
 
For example, if a task subject begins with "Call" the task type could not be "email". It would have to be "call" or "other" for example.
 
The frame work for my validation rule is below but I am getting an error of "Error: Incorrect number of parameters for function IF(). Expected 3, received 2"
 
Any ideas? Thanks.

 

IF(NOT(BEGINS (Subject, "Email")), NOT(CONTAINS(TEXT(Type), "Email"))) 

Message Edited by frasuyet on 09-17-2009 12:44 PM
Steve :-/Steve :-/
IF statements need 3 Parameters, try using an "AND" instead.