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
lsatonylsatony 

Making NOT required

In a set of 3 fields, using validation rules, how can I make 2 required fields NOT required if there is something entered in the 3rd field?  They are all lookup fields.

 

THANKS! 

hhuiehhuie

I think it should look like this:

 

( Field1 = "" || Field2 = "" ) && NOT( Field3 = "" )

 

You just need to tell the system that if Field3 is not filled in to make both fields 1 & 2 required.

JakesterJakester

I think hhuie's logic is sound, but a little syntax tweak. Since they are lookup fields, replace 

 

 

Fieldx = ""

 

 

 with

 

 

ispickval(Fieldx,"")

 

 

 

 

hhuiehhuie
ispickval for for lookup fields?  I thought ispickval are for picklist fields.
JakesterJakester
Oh! Yeah. Duh. Sorry 'bout that!