10 Replies Latest reply on Feb 22, 2012 4:20 PM by disabled_JustinClose

    Custom Function not being accepted....

      Title

      Custom Function not being accepted....

      Post

      This seems really simple, but I am obviously not finding the problem.

      I get an error when i try to 'OK' this custom function:

      -----------------

      Let  (   [ x = getasdate (aDate)  ];

        Case(
            x = ""; x = Month ( Get ( CurrentDate ) );
            x = Month (x)
        )

        Case (
            x <= 3 ; "Q1" ;
            x <= 6 ; "Q2" ;
            x <= 9 ; "Q3" ;
            x <= 12 ; "Q4"
        )
      )

      -------------------------------------

      See screenshot.  Says it expects an operator.  I probably have some simple syntax error that I am not catching.  (I am trying to return a string of the quarter that is passed in as a parameter; if there is no quarter, then it uses the current date to find the quarter.)

       

      I have tried many variations without luck.  The logic seems simple enough.

      cust_func.png