1 Reply Latest reply on May 25, 2012 4:43 PM by james_quiggins

    Task Calculation Error

    solventerprises

      Summary

      Task Calculation Error

      Product

      FileMaker Pro

      Version

      12

      Operating system version

      n/a

      Description of the issue

      In the Task template there is an error in the "Time Frame Order" calculation. If the date due is past due by more than 1 day it doesn't calculate correctly.

      Also, it should say "Past Due" not "Yesterday" because a task could be more than 1 day late.

      Steps to reproduce the problem

      Enter a task that is due more than 2 days ago. Go to the list view and it will be marked as something other than "Yesterday" and there is no "Past Due."

      In my example the task that is due on 5/19 is past due and should be group with the task for "Yesterday."

      Expected result

      Returns "Yesterday" - really "Past Due"

      Actual result

      Returns "This Week" or another status.

      Workaround

      Change the calculation to

      Let      (
           [
           date           = Due Date ;
           now               = Get ( CurrentDate ) ;
           monthYear     = Month ( date ) & Year ( date )
           ] ;
           Case      (
                     now >  date     ; 0 ; // Change "-1 =" to >
                     now      = date     ; 1 ;
                     now + 1 = date      ; 2 ;
                     WeekOfYear ( now ) & Year ( now ) = WeekOfYear ( date ) & Year ( date ) ; 3 ;
                     WeekOfYear ( now ) + 1 & Year ( now ) = WeekOfYear ( date ) & Year ( date ) ; 4 ;
                     Month ( now ) & Year ( now ) = Month ( date ) & Year ( date ) ; 5 ;
                     Month ( now ) + 1 & Year ( now ) = Month ( date ) & Year ( date ) ; 6 ;
                     7
                     )
           )

      //     0 = "Yesterday"
      //     1 = "Today"
      //     2 = "Tomorrow"
      //     3 = "This Week"
      //     4 = "Next Week"
      //     5 = "This Month"
      //     6 = "Next Month"
      //     7 = "Year [yyyy]"

      task-issue-no-1.png