I am looking for a solution how to express a formula for an user-defined field with the following description:
the formula should show the corresponding letter salutation dependent on the picklist values in fields Salutation and Language, for example:
if you choose in the picklist Salutation "Mr." and the contact language is "English", the user-defined field will show for example the expression "Dear Mr. John Benson" for John Benson
if you choose in the picklist Salutation "Mrs." and the contact language is "English", the user-defined field will show for example the expression "Dear Mrs. Diana Fox" for Diana Fox
if you choose in the picklist Salutation "Mr." and the contact language is "English", the user-defined field will show for example the expression "Sehr geehrter Herr X Y" for X Y
I wrote this formula, which unfortunately is not working right:
if((ISPICKVAL(Sprache__c ,"German") && (ISPICKVAL(Salutation ,"Mr."))),"Sehr geehrter Herr" & FirstName & LastName) OR if((ISPICKVAL(Sprache__c ,"German") && (ISPICKVAL(Salutation ,"Mrs."))),"Sehr geehrte Frau" & FirstName & LastName) OR if((ISPICKVAL(Sprache__c ,"English") && (ISPICKVAL(Salutation ,"Mr."))),"Dear Mr." & FirstName & LastName) OR if((ISPICKVAL(Sprache__c ,"English") && (ISPICKVAL(Salutation ,"Mrs."))),"Dea r Mrs." & FirstName & LastName)
The syntax error says "extra if"
Could somebody give me a tip, how can I correct this error? I would appreciate....