You need to sign in to do that
Don't have an account?
Some help with a Validation Rule
I have tried this in many versions, but it just does not work as it should.
I hope somebody can help me!
This is the background:
SAP_Account_Id__c and Navison_Account_Id__c are two text fields
Sell_to__c and Ship_to__c are two checkboxes.
The rule should ensure that a record which has either SAP_Account_Id__c or Navison_Account_Id__c filled in (or both), can be saved only if either Sell_to__c and Ship_to__c (or both) are checked.
This is the last version of the Formula that should evaluate to True:
IF(
ISBLANK(SAP_Account_Id__c)&& ISBLANK( Navison_Account_Id__c),False,
(
IF (
NOT(ISBLANK(Navison_Account_Id__c))|| NOT(ISBLANK(SAP_Account_Id__c)) &&
((Sell_to__c =FALSE && Ship_to__c=TRUE) ||
(Sell_to__c =TRUE && Ship_to__c=FALSE) ||
(Sell_to__c =TRUE && Ship_to__c=TRUE)), False,
(
IF (
NOT(ISBLANK(Navison_Account_Id__c))&& NOT(ISBLANK(SAP_Account_Id__c)) &&
((Sell_to__c =FALSE && Ship_to__c=TRUE) ||
(Sell_to__c =TRUE && Ship_to__c=FALSE) ||
(Sell_to__c =TRUE && Ship_to__c=TRUE)), False,
True
)))))
Thank you very much in advance!
Kind regards
I hope somebody can help me!
This is the background:
SAP_Account_Id__c and Navison_Account_Id__c are two text fields
Sell_to__c and Ship_to__c are two checkboxes.
The rule should ensure that a record which has either SAP_Account_Id__c or Navison_Account_Id__c filled in (or both), can be saved only if either Sell_to__c and Ship_to__c (or both) are checked.
This is the last version of the Formula that should evaluate to True:
IF(
ISBLANK(SAP_Account_Id__c)&& ISBLANK( Navison_Account_Id__c),False,
(
IF (
NOT(ISBLANK(Navison_Account_Id__c))|| NOT(ISBLANK(SAP_Account_Id__c)) &&
((Sell_to__c =FALSE && Ship_to__c=TRUE) ||
(Sell_to__c =TRUE && Ship_to__c=FALSE) ||
(Sell_to__c =TRUE && Ship_to__c=TRUE)), False,
(
IF (
NOT(ISBLANK(Navison_Account_Id__c))&& NOT(ISBLANK(SAP_Account_Id__c)) &&
((Sell_to__c =FALSE && Ship_to__c=TRUE) ||
(Sell_to__c =TRUE && Ship_to__c=FALSE) ||
(Sell_to__c =TRUE && Ship_to__c=TRUE)), False,
True
)))))
Thank you very much in advance!
Kind regards
and first of all: Thank you for your help, both @anilbathula@ and yogesh_cp8888.
Your input has been precious. Both formulas worked almost fine...but not as I needed to, so they served me as a starting point to develop the following:
IF((AND(Sell_to__c=false ,Ship_to__c=false)),
(AND(Sell_to__c=false ,Ship_to__c=false) || AND(ISBLANK(SAP_Account_Id__c),ISBLANK( Navison_Account_Id__c))),
False
)
Thanks again!
Ana
All Answers
try this validation rule:-
AND(Sell_to__c=false ,Ship_to__c=false) || AND(ISBLANK(SAP_Account_Id__c),ISBLANK( Navison_Account_Id__c))
Thanks
Anil.B.
Please try this validation rule :
OR( ISBLANK( SAP_Account_Id__c ) , ISBLANK( Navison_Account_Id__c ) ,IF( Sell_to__c = false, true ,false) ,IF( ship_to__c = false, true ,false) )
Thanks
Chandra Prakash Sharma
Bisp Solutions Inc.
and first of all: Thank you for your help, both @anilbathula@ and yogesh_cp8888.
Your input has been precious. Both formulas worked almost fine...but not as I needed to, so they served me as a starting point to develop the following:
IF((AND(Sell_to__c=false ,Ship_to__c=false)),
(AND(Sell_to__c=false ,Ship_to__c=false) || AND(ISBLANK(SAP_Account_Id__c),ISBLANK( Navison_Account_Id__c))),
False
)
Thanks again!
Ana