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?
Default Appt Lengths
4 posts
• Page 1 of 1
Posts: 32
Joined: Mon Jul 08, 2013 9:43 am |
|
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 |
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?
|
Great! In FileMaker calculations, time is measured in seconds, and 1 hour = 3600 seconds. So yes, half an hour would be 1800.
|
|
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests