14 Replies Latest reply: Jan 3, 2014 11:24 AM by Michael Solomovich RSS

    Problem with Calendar Script

    Steve Zagzebski

      I keep getting the following error message in my calendar script:don't see where there is a problem:

       

      Error in expression: ')' expected

       

      I have narrowed it down to this part of the script that is causing the problem:

       

       

      LET vYTD= Floor(MakeDate(Year(Today()), (Month(Today())-1), Day(MonthEnd(Today()))-1));

       

      If(InYearToDate(Date, $(vYTD), 0)
      or InYearToDate(Date, '12/31/2013', -1)
      or InYearToDate(Date, '12/31/2013', -2)
      or InYearToDate(Date, '12/31/2013', -3)
      or InYearToDate(Date, '12/31/2013', -4)
      , 1, 0) as _YTD,


      If(InYearToDate(Date, $(vYTD), 0)
      or InYearToDate(Date, $(vYTD), -1)
      or InYearToDate(Date, $(vYTD), -2)
      or InYearToDate(Date, $(vYTD), -3)
      or InYearToDate(Date, $(vYTD), -4)
      , 'YTD') as YTD,