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
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))))