Unscheduled Events – Drag to Schedule

Here’s a simple mod to show unscheduled (dateless) events in DayBack Calendar.

This is great for events that haven’t yet been pinned down. They’ll get “UNSCHEDULED” appended to their name and show up on the current day until they’re dragged to an actual date/time. Here’s a movie of this in action:

Instructions

If you’d like to make this change in your copy of DayBack, here are the field definition changes mentioned in the movie above:

DBk_TimestampStartCalcNum:

Let ( [

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

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

// Mod for showing dateless events on the current date; Add a semicolon to the end of the preceding line

    ds = If( not IsEmpty (ds) ; ds ; GetAsDate ( Get ( CurrentTimestamp ) ) ) 

// End modification

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

]; 


    GetAsNumber (
         Timestamp ( ds ; Max ( ts ; 0 ) )
    )
)

DBk_TimestampEndCalcNum:

Let ( [

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

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

// Mod for showing dateless events on the current date

    ds = If( not IsEmpty (ds) ; ds ; GetAsDate ( Get ( CurrentTimestamp ) ) ) ;

// End modification

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

    spanmidnight = not IsEmpty ( te ) and te < ts 

] ;
 
    GetAsNumber (
    Timestamp ( 

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

    ;

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

    )
    )
)

And the beginning of the DBk_WebViewerSource field:

Let ( [

//============= Assign your event fields here ==========================

    sc_sourceNumber = 1 ; // The source number as defined in the "Source No" layout
    sc_id = id ; // the unique ID or primary key of your event record. Often, it's serial number.
    sc_startDate = If ( IsEmpty ( DateStart ); GetAsDate( Get ( CurrentTimestamp ) ); DateStart ) ;
    sc_startTime = TimeStart ;
    sc_endDate = DateEnd ;
    sc_endTime = TimeEnd ;
    sc_summary = Summary ; 
    sc_summaryCalc = If ( IsEmpty ( DateStart ); "UNSCHEDULED - ") & DBk_EventSummaryCalc ; //Read only
    sc_description = Description ; 
    sc_resource = Resource ; 
    sc_status = Status ; 
    sc_contactID = id_contact ;
    sc_contactName = SampleContacts::NameFull ; 
    sc_projectID = id_Project ;
    sc_projectName = SampleProjects::Name ; 
    sc_location = Location ; 
    sc_tags = DBk_Tags ; 


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

Enjoy!

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets

FileMaker Summer Camp – Recap

Unconference Sessions If you missed Pause in October, here’s a look at the sessions that attendees hosted. All the sessions are listed in this post

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.