+ Start a Discussion
Rung41Rung41 

Validation Rule to prevent another field from being populated and vice versa

Is it possible to create a validation rule across two fields.
For example
If "FieldA" (a text field) is populated then "FieldB" (a picklist field) cannot be populated.
and vice versa
If "FieldB" (a picklist field) is populated then "FieldA" cannot be popualted.


techcharlietechcharlie

Sure! I havent tested this, but you can do something like this. This way the validation rule will always fire if there is a value in either one.

AND(
LEN(FieldA) > 0,
TEXT(LEN(FieldB) >0)
)

Rung41Rung41
I keep getting the error Incorrect parameter type for operator '>'. Expected Boolean, received Number

AND(
TEXT(LEN(ISPICKVAL(Referral_Fee__c,"") > 0)),
TEXT(LEN((ISPICKVAL(Revenue_Share__c, "")> 0))))