3 Replies Latest reply on May 31, 2014 6:39 AM by philmodjunk

    Function

    Deenos

      Title

      Function

      Post

           Hi:

           What am I doing wrong with this functions:

           Case ( ABC_Benchmark_Total_Percentage  ≤19;"0";ABC_Benchmark_Total_Percentage  ≥ 20 or ≤ 29;"1";ABC_Benchmark_Total_Percentage ≥30 or ≤39;"2";ABC_Benchmark_Total_Percentage ≥60;"3" )

           I keep getting this message: "a number, text constant, field name or "(" is expected here.


            

        • 1. Re: Function
          Deenos

               i need to edit this post:This is what it should be but still getting the same error message. In help is appreciated.

               Case ( ABC_Benchmark_Total_Percentage  ≤ 19;ABC_EARF_Benchmark_Rating Copy= 0;ABC_Benchmark_Total_Percentage  ≥ 20 or ≤ 29;ABC_EARF_Benchmark_Rating Cop"=1;ABC_Benchmark_Total_Percentage ≥ 30 or ≤ 39;ABC_EARF_Benchmark_Rating Copy=2;ABC_Benchmark_Total_Percentage ≥ 60;ABC_EARF_Benchmark_Rating Copy=3 )

          • 2. Re: Function
            raybaudi

                 If the calculation field is named: ABC_EARF_Benchmark_Rating Copy, try:

                 Case(
                 ABC_Benchmark_Total_Percentage ≤ 19 ; 0 ;
                 ABC_Benchmark_Total_Percentage ≤ 29 ; 1 ;
                 ABC_Benchmark_Total_Percentage ≤ 39 ; 2 ;
                 ABC_Benchmark_Total_Percentage ≥ 60 ; 3
                 )

            • 3. Re: Function
              philmodjunk

                   I would do it exactly as raybaudi has posted it. Case functions evaluates each logical test in turn starting with the first and stopping with the first one to evaluate as true so there is no need to use OR in this particular situation.

                   But to explain the syntax error that you were getting, when you need to use the And or Or logical operators, you have to keep in mind that this is a computer system and not an English speaking person. The expression using  OR, would be entered like this:

                   ABC_Benchmark_Total_Percentage  ≥ 20 or ABC_Benchmark_Total_Percentage ≤ 29