Default Appt Lengths

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 32
Joined: Mon Jul 08, 2013 9:43 am
PostPosted: Mon Jul 08, 2013 11:08 am
I was working on creating a calculation that said if the Status was X then make the End Time 1hr after Start time. Since there was already a calculation in End Time I tried to add this on the end:

If ( Status = "Pregnancy Test" ; Truncate (TimeStart + 0; 60 ; 0)

This is obviously not working. FileMaker says I need an additional modifier. I'm sure someone before me has done this.

Tips or tricks?
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon Jul 08, 2013 4:48 pm
Hi Illyssa. The TimeEnd field needs to be a Time field (not a calculation field), so I assume you're talking about the auto-enter calculation formula. Try editing it to look like this (I just added the first line about the pregnancy test):

Case (
Status = "Pregnancy Test" ; TimeStart + 3600 ;
Self = Time ( 24 ; 0 ; 0 ) ; Time ( 24 ; 0 ; 1 ) ;
Self = Time ( 0 ; 0 ; 0 ) ; Time ( 0 ; 0 ; 1 ) ;
Self > Time ( 24 ; 0 ; 0 ) ; Self - Time ( 24 ; 0 ; 0 ) + 1 ;
Self )
Posts: 32
Joined: Mon Jul 08, 2013 9:43 am
PostPosted: Tue Jul 09, 2013 6:12 am
Jeff- that worked wonderfully thank you. Why is it plus 3600 if you don't mind me asking? I kept trying to figure if out but couldn't. So if I wanted it to be half an hour would it be plus 1800?
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Tue Jul 09, 2013 6:39 am
Great! In FileMaker calculations, time is measured in seconds, and 1 hour = 3600 seconds. So yes, half an hour would be 1800.

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: