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
Tanvi KakkarTanvi Kakkar 

Validation rule to take values only from look up values .

Need to write a validation rule where I want the user to take values only from look field . 
Go to account > open activities > new Task > subject ..
datatype of subject field is picklist but it is displaying as look up . I want to restrict user to take values only from that lookup picklist and not enter any custom values . 
Please help .
Thanks in advance.
Best Answer chosen by Tanvi Kakkar
KaranrajKaranraj
Create validate rule on the task object with this condition
AND( 
Subject <> "Call", 
Subject <> "Email", 
Subject <> "Send Letter", 
Subject <> "Send Quote", 
Subject <> "Other" 
)

If user enters other than that value in Subject, then it will display error message
 

All Answers

KaranrajKaranraj
Create validate rule on the task object with this condition
AND( 
Subject <> "Call", 
Subject <> "Email", 
Subject <> "Send Letter", 
Subject <> "Send Quote", 
Subject <> "Other" 
)

If user enters other than that value in Subject, then it will display error message
 
This was selected as the best answer
Tanvi KakkarTanvi Kakkar
Thanks Karan , it works fine .
Can u please explain why we have not used ISPICKVAL here . when in datatype the value is picklist . 
and how we can write it using NOT .