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
greg777greg777 

IF & OR statement help

I need help with the below. I am trying to have 3 separate OR conditions that return a different result into a custom field. Hopefully the below explains it.

IF(
OR(
ISPICKVAL(Purchase_Type__c , "CPAP" ) , CASE(Benefit_Code__c, "REG", 780, "ODS", 1040, "OWP", 1040, 0))
OR(
ISPICKVAL(Purchase_Type__c , "COMP" ) , CASE(Benefit_Code__c, "REG", 109.50, "ODS", 146, "OWP", 146, 0))
OR(
ISPICKVAL(Purchase_Type__c , "COMP-P" ) , CASE(Benefit_Code__c, "REG", 322.50, "ODS", 430, "OWP", 430, 0))
)
Nathan CrosbyNathan Crosby
IF I read what you're after correctly the below should work.

Code:
IF(ISPICKVAL(Purchase_Type__c , "CPAP"), CASE(Benefit_Code__c, "REG", 780, "ODS", 1040, "OWP", 1040, 0),
IF(ISPICKVAL(Purchase_Type__c , "COMP"), CASE(Benefit_Code__c, "REG", 109.50, "ODS", 146, "OWP", 146, 0),
IF(ISPICKVAL(Purchase_Type__c , "COMP-P"), CASE(Benefit_Code__c, "REG", 322.50, "ODS", 430, "OWP", 430, 0), 0
)
)
)

 

greg777greg777
Thanks Nathan...worked.

Sure nice to have the support like this.

Greg