You need to sign in to do that
Don't have an account?
Denise Wilhite 6
Help with picklist formula field
I need some help please with a formula field. I am trying to write a formula that references another field on the same object that is a picklist field. I want to have the value in this new field to be based on the picklist value from the other field. The formula that I am trying to write consists of:
IF(ISPICKVAL(Loan_Documentation__c = "Attorney Prepared", Yes,Bypass CDP,
ISPICKVAL(Loan_Documentation__c = "Internal Loan Agreement and Attorney Closed",Yes, Bypass CDP,
ISPICKVAL(Loan_Documentation__c, = "Internal Loan Agreement and No Attorney Closed", No,
ISPICKVAL(Loan_Documentation__c, = "No Loan Agreement Needed", No
)
)
)
)
)
I get an error message with this that states "Error: Syntax error. Found 'Bypass'. What am I doing wrong?
Thank you!
IF(ISPICKVAL(Loan_Documentation__c = "Attorney Prepared", Yes,Bypass CDP,
ISPICKVAL(Loan_Documentation__c = "Internal Loan Agreement and Attorney Closed",Yes, Bypass CDP,
ISPICKVAL(Loan_Documentation__c, = "Internal Loan Agreement and No Attorney Closed", No,
ISPICKVAL(Loan_Documentation__c, = "No Loan Agreement Needed", No
)
)
)
)
)
I get an error message with this that states "Error: Syntax error. Found 'Bypass'. What am I doing wrong?
Thank you!
ISPICKVAL has two arguments and IF has three arguments. https://help.salesforce.com/articleView?id=customize_functions_i_z.htm&type=5 (https://help.salesforce.com/articleView?id=customize_functions_i_z.htm&type=5)
You can try something like this:
It's just that you're not passing the values correctly with the IF condition. You need to pass the values and expressions like:
For single conditions:
-> IF( Expression1=Expression2 , Value if true , Value if false)
or
For multiple conditions:
-> IF(Expression1=Expression2 , Value if true ,
IF(Expression1=Expressiom3 , Value if true,
IF(--------)))
So if we talk about your formula, we can do it this way:
IF(ISPICKVAL(Loan_Documentation__c, "Attorney Prepared"), Bypass CDP,
IF(ISPICKVAL(Loan_Documentation__c, "Internal Loan Agreement and Attorney Closed"), Bypass CDP,
IF(ISPICKVAL(Loan_Documentation__c, "Internal Loan Agreement and No Attorney Closed"), No,
IF(ISPICKVAL(Loan_Documentation__c, "No Loan Agreement Needed"), No, null))))
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha