IF Statement in Zoho CRM Formula Field

IF Statement in Zoho CRM Formula Field

Hi,

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.

Stated differently:
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.

Thank you in advance for your help!

      Zoho Developer Community









                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation


                                            Manage your brands on social media



                                                  Zoho TeamInbox Resources

                                                    Zoho DataPrep Resources



                                                      Zoho CRM Plus Resources

                                                        Zoho Books Resources


                                                          Zoho Subscriptions Resources

                                                            Zoho Projects Resources


                                                              Zoho Sprints Resources


                                                                Qntrl Resources


                                                                  Zoho Creator Resources



                                                                    Zoho WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • Functions

                                                                          Functions

                                                                        • Meetups

                                                                          Meetups

                                                                        • Kbase

                                                                          Kbase

                                                                        • Resources

                                                                          Resources

                                                                        • Digest

                                                                          Digest

                                                                        • CRM Marketplace

                                                                          CRM Marketplace

                                                                        • MVP Corner

                                                                          MVP Corner





                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now