+ Start a Discussion
Santi Ram RaiSanti Ram Rai 

picklist and text field validation rules

Hi everybody.

I want to write a validation rules; my question is, if the Project Name (text filed) and  Project Type (picklist field) has same text then it should end the process, but if they are with different value; for example in Project Name is "Leave" and Project Type is "Holiday"  validation rules viges the error message. Please some one can help me to write this rules?

User-added image
Best Answer chosen by Santi Ram Rai
ManojjenaManojjena
Hi Santi Ram,

You can try with belwo validation and add erroe message as your need .
Option 1
ProjectNamc__C=='Leave' && TEXT(Project_Type__c) != 'Leave'   
Option 2
AND(ProjectName__c= 'Leave', TEXT(Project_Type__c) != 'Leave')
OPtion 3
IF(AND(ProjectName__c= 'Leave', TEXT(Project_Type__c) != 'Leave'),true,false)
All validation will work for you .Check your Field api name an dreplace if differeent .

Let me know if it helps !!
Thanks
Manoj
 

All Answers

ManojjenaManojjena
Hi Santi Ram,

You can try with belwo validation and add erroe message as your need .
Option 1
ProjectNamc__C=='Leave' && TEXT(Project_Type__c) != 'Leave'   
Option 2
AND(ProjectName__c= 'Leave', TEXT(Project_Type__c) != 'Leave')
OPtion 3
IF(AND(ProjectName__c= 'Leave', TEXT(Project_Type__c) != 'Leave'),true,false)
All validation will work for you .Check your Field api name an dreplace if differeent .

Let me know if it helps !!
Thanks
Manoj
 
This was selected as the best answer
geeta garggeeta garg
IF(project__c.name<>TEXT(project_type__c),true,false)

you can use it for validate data.