+ Start a Discussion
Lukasz PiziakLukasz Piziak 

IF/AND/OR Formula help

Hi,
I have a formula below which is working fine.

IF(
    AND(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "POLYSIL")
        ),
"POLYSIL", 
NULL)

I would like to add another condition to this formula
IF(
    AND(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "BRITELOK")
        ),
"BRITELOK", 
NULL)

Code should look like like this below:
IF(
    AND(
              OR(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "POLYSIL")
        ), "POLYSIL", 
IF(
    AND(
        OR(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "BRITELOK")
        ), "BRITELOK", NULL))

I'm getting error message in my flow. Please advise the proper form of this formula.

Many thanks for any help.
Regards
Lukasz
Raj VakatiRaj Vakati
Can you please check what is the error you are getting and whihc condition so that you can rewrite the validation rule
SathishPanjalaSathishPanjala
Please Try this : 

IF(
    AND(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "POLYSIL")
        ),
"POLYSIL", 
IF(
    AND(
         CONTAINS({!Matching_Hose_Records}, "POLYSIL PFA"),
         CONTAINS({!Fitt1Selection}, "BRITELOK")
        ),
"BRITELOK", 
NULL)
)

Please mark is solved, If it answer your question.