1

I trying to create a row level formula with "IF" "OR" "AND" but I receiving a error that is missing ')'.

(
        Opportunity.Campo_D__c< TODAY(),
    IF (
    AND 
        (Opportunity.Campo_D__c<TODAY()+15,
        Opportunity.Campo_D__c>TODAY(),
              IF (
                 OR
            (
                Opportunity.Campo_DE__c> TODAY()+ 15,
                Opportunity.Campo_DE__c<TODAY(),
"Teste OK","Teste NOK")))))

The error that I'm receiving is "Error when encoding row-level formula: Incorrect number of parameters for function 'IF()'. Expected 3, received 1"

2
  • When you want populate Teste Ok ? explain more what are you trying to do in the formula? Dec 16, 2022 at 0:25
  • Your last OR statement is missing a closing paren
    – cropredy
    Dec 16, 2022 at 0:36

1 Answer 1

1

I have reformatted this and you were missing 2 parenthesis + also missing the else statement from two of the if statements. I've added them (but you may want to change of course)

IF ( Opportunity.Campo_D__c< TODAY(),
    IF ( AND (Opportunity.Campo_D__c < TODAY()+15, 
              Opportunity.Campo_D__c>TODAY()
              ),
         IF ( OR ( Opportunity.Campo_DE__c> TODAY()+ 15,
                   Opportunity.Campo_DE__c<TODAY() 
                 ),
              "Teste OK",
              "Teste NOK"
            ),
          "FALSE CONDITION"  
        ),
        "FALSE CONDITION"
   )

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .