1

I'm working on a formula field that will display various options on a field called Option Picked based on the amount in the secondary custom field called "last month GTV" If Client type is "Customer".

Option A Option B Option C

IF( (ISPICKVAL( Type , "Customer")) ,( 


IF( Last_Month_GTV__c >160,"3. Option A", 
(IF (Last_Month_GTV__c >40, "2. Option B", 
(IF (Last_Month_GTV__c >0, "1. Option C",Null)))))), 
"Prospect")

that works without any issue. However, I want to add the criteria if a VIP checkbox on the same object is checked to True then ignore the amount and update the option to Option A regardless of the Last Month GTV amount.

Here is my attempt when adding OR to the formula:

IF( (ISPICKVAL( Type , "Customer")) ,( 


IF( Last_Month_GTV__c >160 || (IF( VIP__c = 'yes'),"3. 
Option A", 
(IF (Last_Month_GTV__c >40, "2. Option B", 
(IF (Last_Month_GTV__c >0, "1. Option C",Null))))))))),
"Prospect")

I keep getting the error message "Error: Syntax Error. Missing')'

Any help would be appreciated.

  • Possible that you are missing a parenthesis somewhere as the error message states? you should try fixing that error first. – glls May 5 '17 at 21:33
1

Checkbox will not consider String yes for comparison, it should be either Boolean type true or false or 1 or 0.

Use this approach.

IF( (ISPICKVAL( Type , "Customer")) , 
    IF(VIP__c, "3. Option A",
    ( 
    IF( Last_Month_GTV__c >160,"3. Option A", 
        (IF (Last_Month_GTV__c >40, "2. Option B", 
            (IF (Last_Month_GTV__c >0, "1. Option C",Null))
            )
        )
    )
   )
 ), 
"Prospect")
  • Just VIP__c is fine. No need to = TRUE. – sfdcfox May 5 '17 at 21:57
  • thats also true – Santanu Boral May 5 '17 at 22:02
  • @SantanuBoral thank you for your help, that worked! – Xperez May 9 '17 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.