To-Do's not rolling over

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Sat Dec 20, 2014 10:58 am
Hello:

To-Do's are not rolling forward to today's date.

Can you help me figure out how to enable this?

Jim
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Sat Dec 20, 2014 11:12 am
Hello:

I was able to fix this by modifying the DBK_WebViewerSource field in the ToDo's table; specifically, the definition of "endDate":

Code: Select all
 endDate = Case (IsEmpty (DateDone) ; Get ( CurrentDate ) ; DateDone) ;


This seems to work. Thoughts?

Jim
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Dec 22, 2014 8:36 am
That sounds perfect! Nice job. :)
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Mon Feb 02, 2015 7:56 am
Unfortunately, To-Do's are still not rolling over. Actually, now I am not sure whether my previous modification worked or not. It certainly is not working now.

Here's my situation:

Currently, all To-Do's are displayed on their Start Date (creation date), until they are marked done. I don't want that.

I want To-Do's to "roll over" = to show up on today's date until they are marked done. When they are marked done, I want them to show up on the date they were marked done. But I also want the To-Do's creation date to display as the "Start Date".

So for example, I create a To-Do today. Its start date is 2/2/2015. It is not done. Therefore, it should appear on the current date in calendar views. So let's say it's now 3 days from now (2/5/2015). I complete the To-Do. I mark it Done. Now it should remain visible on 2/5/2015 for ever. And: when I click to open this To-Do (to view its details), I should see: Start Date: 2/2/2015; Done Date: 2/5/2015.

I hope it's clear from the above description that I do not need or want any "due dates."

So, here's what I have in my current file, which is a previous version of SeedCode calendar that is linked to the current version of DayBack:

DBK_TimeStampEndCalcNum:
Code: Select all
Let ( [

//============= Assign your date and time fields here ==========================

    ds = DateStart ; // Your event's date start field
    de = DateDone ; // Your event's date end field
    ts = TimeStart ; // Your event's time start field
    te = TimeEnd ; // Your event's time end field

//============= We treat ToDos a little differently also aslo ask for their done date and status ==


    dd = DateDone ; // Your event's done date field
    sts = Status ; // Your event's status field


//============= You shouldn't have to edit below this line ==========================

    spanmidnight = not IsEmpty ( te ) and te < ts ;

    de = If ( sts= "done" ; dd ;  Get ( CurrentDate ))  // for To-Dos we show the event on its start date if not done, if done the on its done date

] ;
 
    GetAsNumber (
    Timestamp (

        If ( spanmidnight and IsEmpty ( de ) ; ds + 1 ; Max ( ds ; de ) )

    ;

       If ( IsEmpty ( te ) ; Max ( ts ; 0 ) ; te )

    )
    )
)


DBKTimeStampStartCalcNum:
Code: Select all
Let ( [

//============= Assign your date and time fields here ==========================

    ds = DateStart ; // Your event's start date field
    ts = TimeStart ; // Your event's start time field

//============= We treat ToDos a little differently also aslo ask for their done date and status ==


    dd = DateDone ; // Your event's done date field
    sts = Status // Your event's status field



//============= You shouldn't have to edit below this line ==========================

];


    GetAsNumber (
         Timestamp ( If ( sts = "done" ; dd ; Get ( CurrentDate )) ; Max ( ts ; 0 ) )  // show the event on it's done date if done, otherwise on it's start date.
    )
)


DBK_WebViewerSource:
Code: Select all
Let ( [

//============= Assign your event fields here ==========================
    sourceNumber = 2 ; // The source number as defined in the "Source No" layout
    id = id ; // the unique ID or primary key of your event record. Often, it's serial number.
    startDate = Case (IsEmpty (DateDone) ; Get ( CurrentDate ) ; DateDone) ;
    startTime = TimeStart ;
    endDate = Case (IsEmpty (DateDone) ; Get ( CurrentDate ) ; DateDone) ;
    endTime = TimeEnd ;
    summary = Summary ;
    summaryCalc = DBK_EventSummaryCalc ; //Read only
    description = Description ;
    resource = Resource ;
    status = Status ;
    contactID = "" ;
    contactName = "" ;
    projectID = "" ;
    projectName = "" ;

// ===== Define options here ->

    returnSeparator = " | "; //This is the character that will be shown in place of return characters when viewing certain views.


//============= Do not edit below this line ==========================

    summaryCalc = DBK_EventSummaryCalc ; // Should always be DBk_EventSummaryCalc
    allDay = Case ( startTime > 0 ; "false" ; "true" ) ;

    startDate = Max ( Date ( 0 ; 0 ; 0 ) ; startDate ) ;
    startTime = Max ( Time ( 0 ; 0 ; 0 )  ; startTime ) ;
    s_yr = Right ( "0000" & Year ( startDate ) ; 4 ) ;
    s_mo = Right ( "00" & Month ( startDate ) ; 2 ) ;
    s_da = Right ( "00" & Day ( startDate ) ; 2 ) ;
    s_hr = Right ( "00" & Hour ( startTime ) ; 2 ) ;
    s_mi = Right ( "00" & Minute ( startTime ) ; 2 ) ;
    s_se = Right ( "00" & Seconds ( startTime ) ; 2 ) ;
    iCalStart = s_yr & "-" & s_mo & "-" & s_da & "T" & s_hr & ":" & s_mi & ":" & s_se ;

    endDate = Case (
        IsEmpty (endDate) ; "" ;
        Max ( Time ( 0 ; 0 ; 0 )  ; endDate )
    ) ;
    endTime = Case (
        IsEmpty (endTime) ; "" ;
        Max ( Time ( 0 ; 0 ; 0 )  ; endTime )
    ) ;
    e_yr = Right ( "0000" & Year ( endDate ) ; 4 ) ;
    e_mo = Right ( "00" & Month ( endDate ) ; 2 ) ;
    e_da = Right ( "00" & Day ( endDate ) ; 2 ) ;
    e_hr = Right ( "00" & Hour ( endTime ) ; 2 ) ;
    e_mi = Right ( "00" & Minute ( endTime ) ; 2 ) ;
    e_se = Right ( "00" & Seconds ( endTime ) ; 2 ) ;
    iCalDateEnd = Case (not IsEmpty (endDate) ;
        e_yr & "-" & e_mo & "-" & e_da ;
        "" );
    iCalTimeEnd = Case (not IsEmpty (endTime) ;
        "T" & e_hr & ":" & e_mi & ":" & e_se ;
        "" );
    iCalEnd = iCalDateEnd & iCalTimeEnd ;

    substituteReturn = Case ($$sc_Mode = "Month" or $$sc_Mode = "Day" or $$sc_Mode="Week" or allDay = "true" ;
        returnSeparator ;
        "\n"
    )

] ;


Substitute (

List (
Quote ( Substitute ( sourceNumber ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( id ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( allDay ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( iCalStart ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( iCalEnd ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( summaryCalc ; ["¶" ; "\n"] ; ["\n" ; substituteReturn] ) ) ;
Quote ( Substitute ( Summary ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( Description ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( Resource ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( Status ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( contactID ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( contactName ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( projectID ; "¶" ; "\n" ) ) ;
Quote ( Substitute ( projectName ; "¶" ; "\n" ) )
)

 ; "¶" ; "," )

) // End Let


So can you help me fix this?

Jim
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Feb 02, 2015 10:37 am
Hi Jim. That all looks correct. I just made those same edits in a fresh copy of Dayback and it worked - all undone ToDo records appear on today's date. Send me your files if you'd like me to help you figure out what's wrong.
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Mon Feb 02, 2015 12:43 pm
Hi Jeff:

I will send you a Dropbox link to both files. Note: It may be a problem with Filters.

Jim
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Mon Feb 02, 2015 1:02 pm
Hi again Jeff:

I'll be sharing those files with you shortly but I wanted to let you know I've noticed something very peculiar:

The files I'm sharing with you (which I downloaded from our remote host, pointinspace.com) this afternoon) behave differently than the files I access directly on our server at pointinspace.com.

For example, in our "live" solution (hosted at pointinspace.com), only completed To-Do's show up in DayBack calendar views. But using the files that I downloaded (that I did not modify in any way after downloading), incomplete To-Do's show up (as I want them to), but To-Do's completed on today's date do not appear.

I'm doing a lot of head scratching.

Talk to you soon.

Jim
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Feb 02, 2015 1:39 pm
Thanks for sending your files. Everything seems to be working correctly. Can you send some screen shots, or even better, a screen case movie showing the problem you're seeing? We use Jing for this. It's free and easy to use: http://www.techsmith.com/jing.html

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: