Formula to require when yes/no checkbox true and require empty when false


Badge +2

I have a yes/no checkbox that is defaulted to No when new (Occupied). I have a people picker for the user name. I found a formula to require the people picker, which I applied to the Name field if yes which translates to true.  The one below works for that piece. 

and(Occupied==true, isNullorEmpty({self}))

Can I add an OR statement to ensure the people picker is empty if No?

 


2 replies

Badge +6

Hi.

 

I think this what you're looking to do

(Occupied == true && {self} == "") || (Occupied == false && {self} != "")

This is a validation rule.  If it evaluates true, it will fail validation.

Hope this helps.

Badge +2

Perfect, it worked!! Thanks!

Reply