4 Replies Latest reply on Sep 28, 2018 5:16 AM by Goran Kolaric

    Formula error in Calculated field with fields from multiple Data sources

    Goran Kolaric

      I am trying to create formula in Calculated Filed by using fields from 4 different Data Sources

       

      CONTAINS([O1-COMMERCIAL ACCOUNT INVALID],'true')or

      CONTAINS([O2-ACCOUNT LE INVALID],'true')or

      CONTAINS([O3-END USER LE INVALID],'true')or

      CONTAINS([O4-SELLING LE INVALID],'true') or

      CONTAINS([O5-INTERCOMPANY TYPE INVALID],'true')or

      CONTAINS([O6-CHANNEL PARTNER INVALID],'true')or

      CONTAINS(ATTR([ACCOUNTS].[AT2- Lower CASE ACCOUNT NAME]),'True')

      CONTAINS(ATTR([CONTACTS].[CT1 - Incorrect name NUMBERS & CHARACTERS]),'True')

      CONTAINS(ATTR([ACTIVITIES].[AY1-D-Past Due]),'True')

       

      but I am getting this error:

      The calculation contains errors - Syntax error, (maybe you are missing an operator).

       

      I tried to move / add commas and move / add brackets, but no luck.

       

      Please advise what should I modify to get valid formula.

      Thanks

      Goran

        • 1. Re: Formula error in Calculated field with fields from multiple Data sources
          Sankarmagesh Rajan

          Hi goran

           

          Last two contains missing with or operator

          CONTAINS(ATTR([ACCOUNTS].[AT2- Lower CASE ACCOUNT NAME]),'True')

          CONTAINS(ATTR([CONTACTS].[CT1 - Incorrect name NUMBERS & CHARACTERS]),'True')

          CONTAINS(ATTR([ACTIVITIES].[AY1-D-Past Due]),'True')

           

          If you add or also it will throw error.

          aggregate and dis aggregate error will come

           

          need to add like this

          CONTAINS(attr([Category]),'Furniture') or CONTAINS(attr([Orders (Sample - Superstore) (2)].[Region]),'East')

           

           

          Try this

           

          CONTAINS(attr([O1-COMMERCIAL ACCOUNT INVALID]),'true')or

          CONTAINS(attr([O2-ACCOUNT LE INVALID]),'true')or

          CONTAINS(attr([O3-END USER LE INVALID]),'true')or

          CONTAINS(attr([O4-SELLING LE INVALID]),'true') or

          CONTAINS(attr([O5-INTERCOMPANY TYPE INVALID]),'true')or

          CONTAINS(attr([O6-CHANNEL PARTNER INVALID]),'true')or

          CONTAINS(ATTR([ACCOUNTS].[AT2- Lower CASE ACCOUNT NAME]),'True') or

          CONTAINS(ATTR([CONTACTS].[CT1 - Incorrect name NUMBERS & CHARACTERS]),'True') or

          CONTAINS(ATTR([ACTIVITIES].[AY1-D-Past Due]),'True')

           

          Thanks

          sankar

          • 2. Re: Formula error in Calculated field with fields from multiple Data sources
            Goran Kolaric

            Thank you Sankar.

             

            When I add below lines as suggested, I am still getting 3 errors under last 3 CONTAINS, saying: "CONTAINS is being called with (boolean, sting), did you mean (string,string)?"

             

            CONTAINS(ATTR([O1-COMMERCIAL ACCOUNT INVALID]),'True')or

            CONTAINS(ATTR([O2-ACCOUNT LE INVALID]),'True')or

            CONTAINS(ATTR([O3-END USER LE INVALID]),'True')or

            CONTAINS(ATTR([O4-SELLING LE INVALID]),'True') or

            CONTAINS(ATTR([O5-INTERCOMPANY TYPE INVALID]),'True')or

            CONTAINS(ATTR([O6-CHANNEL PARTNER INVALID]),'True')or

            CONTAINS(ATTR([ACCOUNTS].[AT2- Lower CASE ACCOUNT NAME]),'True') OR

            CONTAINS(ATTR([CONTACTS].[CT1 - Incorrect name NUMBERS & CHARACTERS]),'True') OR

            CONTAINS(ATTR([ACTIVITIES].[AY1-D-Past Due]),'True')

             

            Please advise.

            Thanks

            Goran

            • 3. Re: Formula error in Calculated field with fields from multiple Data sources
              Sankarmagesh Rajan

              Hi Goran,

               

              Boolean will come with true or false, so need to remove contains here

               

              CONTAINS(ATTR([O1-COMMERCIAL ACCOUNT INVALID]),'True')or

              CONTAINS(ATTR([O2-ACCOUNT LE INVALID]),'True')or

              CONTAINS(ATTR([O3-END USER LE INVALID]),'True')or

              CONTAINS(ATTR([O4-SELLING LE INVALID]),'True') or

              CONTAINS(ATTR([O5-INTERCOMPANY TYPE INVALID]),'True')or

              CONTAINS(ATTR([O6-CHANNEL PARTNER INVALID]),'True')or

              ATTR([ACCOUNTS].[AT2- Lower CASE ACCOUNT NAME]) OR

              ATTR([CONTACTS].[CT1 - Incorrect name NUMBERS & CHARACTERS]) OR

              ATTR([ACTIVITIES].[AY1-D-Past Due])

               

              Drag this into filter and select only true and output.

               

              thanks

              sankar

              1 of 1 people found this helpful