I am attempting to write a formula field that will give me one result if one statement AND another statement are true, then a different value if the first statement AND a different statement are true, else 0.
if account = destination && amount>0 = amount
if account = destination && percentage>0 = percentage
else 0
Where "Account" is a string, "Amount" is a currency, and "Percentage" is a decimal.
I have tried so many different iterations that I think I'm just entirely off track now. But the last non-working iteration is:
IF(AND(CONTAINS(${Investment Instructions.Account},'Destination'),${Investment Instructions.Amount} > 0),${Investment Instructions.Amount},0),IF(AND(CONTAINS(${Investment Instructions.Account},'Destination'), ${Investment Instructions.Percentage (%)} > 0), ${Investment Instructions.Percentage (%)}, 0)
Resulting in the error: Syntax Error. Check the examples for any functions you're using to see if you formatted them correctly. Make sure your fields are formatted like this: ${Module Name.Field Name}.
I have read that IF/AND may not be the solution in CRM formula fields, and rather do a nested IF. My attempt at that also failed and there have been many failed attempts.