I recently decided to add an indicator showing the current time range on the schedule view, similar to that found in iCal
Anyway, I thought I would share it...
Add a text box to the top portal row with your desired height and set conditional formatting with the following calculation choosing to set a fill colour etc as desired
---------------------------
Let (
timescale =
Case ( not IsEmpty (GetAsNumber(CalendarInterface::TimeScaleGlob)) ; GetAsNumber(CalendarInterface::TimeScaleGlob) ;
CalendarInterface::TimeScaleGlob = "half hour" ; 30 ;
CalendarInterface::TimeScaleGlob = "hour" ; 60 ) ;
Get(CurrentTime) ≥ CalendarRows::TimeDisplayCalcs and
Get(CurrentTime) < CalendarRows::TimeDisplayCalcs + timescale * 60
)
---------------------------
The portal row should now have an indicator as to the current time....
Adding an iCal style time line to the schedule page
12 posts
• Page 1 of 1
Posts: 135
Joined: Fri Sep 28, 2007 3:09 pm Location: UK |
Steve Wright
SWS Solutions |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Fantastc!
Here is what Steve is talking about (see the thing red line at 11am): Here is a larger version. I just used a field instead of a text block because I can't seem to get text blocks down to 1px in height (I used CalendarBlankRepsGlob). And you'll have to put this on each calendar tab you wish to see it (It doesn't make sense on the simple view or the month view). VERY nice Steve; thanks! ...want to do one for the grid view? ;-) John Sindelar
SeedCode |
Posts: 135
Joined: Fri Sep 28, 2007 3:09 pm Location: UK |
I just decided to go the field route also after having trouble getting it small enough to look neat... It doesn't quite look right having it highlite a full row.
Great screenshot... Steve Wright
SWS Solutions |
Posts: 135
Joined: Fri Sep 28, 2007 3:09 pm Location: UK |
Just realised that this does not show after midnight, due to the times being 26:00 28:00 etc so heres what I have so far, which does show past midnight.
Steve Wright
SWS Solutions |
Posts: 11
Joined: Tue Mar 07, 2006 10:39 am Location: Eugene, OR |
Thanks for the great idea. I'm adapting this for Pro 4.2 and am not able to display the highlight at the "30" or "half hour", for some reason. Also, I'm not able to figure out how to make this work without refreshing the window at each 30 minute interval. I have the following code set for a conditional on a global text field I added to the Hours table [HourSchedulingTimeLineGlob]. Any help would be appreciated. I'm running FMS/P 10 on Mac 10.5.X
--Paul
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hey Paul: very cool.
Try using HourTime_k instead of HourTimeDisplayCalc. That should get you showing at other time increments. I'm not sure what you mean about refreshing at every 30 min interval: send us some more details if the change above doesn't help. John John Sindelar
SeedCode |
Posts: 11
Joined: Tue Mar 07, 2006 10:39 am Location: Eugene, OR |
Thanks John. Everything seems to be working with your change. The window refresh is no longer an issue. Thanks a lot! I've been twiddling with this for 2 days!! Haha! My staff really likes how easy it is to spot the current timeline for the appointments they have. There should be a tax on how much fun I (we) have with your code!
--Paul
|
Posts: 11
Joined: Tue Mar 07, 2006 10:39 am Location: Eugene, OR |
I do have an issue with the new timeline advancement, after all...
Using the calendar's "Schedule" layout, and the timeline is at the correct position, I do work in another database window and 3.5 hours later, I notice, on the calendar's window in the background, that timeline is still positioned at the old time, 3.5 hours ago. Even when I click on the calendar window, the highlight stays on the old time. Not until I change to another calendar layout and go back or click on the "Go to Today" button does the timeline advance correctly. Is there a method I can use to have the timeline always get positioned, automatically? --Paul
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
the timeline relies on an unstored calc, so anything you do to refresh the window (change tabs, make events, edit records, etc) will cause the timeline to move. It won't move on its own, an unfortunately selecting the window isn't enough to cause it to refresh.
However, using FileMaker 10 you can install on OnTime script trigger that refreshes the window every x minutes. John Sindelar
SeedCode |
Posts: 135
Joined: Fri Sep 28, 2007 3:09 pm Location: UK |
Using the OnTimer trigger, you could set it to refresh based on the current calendar scale, so on a 15 min scale, refresh every 15 minutes..
since there is obviously no point refreshing (unless you want to) every 15 mins for a 1 hour timescale. You would just need to re-instate the OnTimer trigger when / if you change the timescale. Steve Wright
SWS Solutions |
Posts: 11
Joined: Tue Mar 07, 2006 10:39 am Location: Eugene, OR |
Thanks John & Steve. That did the trick. I was thinking about a trigger plug-in, but wanted to hear from the experts. Thanks again.
--Paul
|
Posts: 135
Joined: Fri Sep 28, 2007 3:09 pm Location: UK |
Just thought you may be interested to know, at midnight, the line will show across all rows in the 'all day' section, since it has only just come to my attention I have not looked into it yet...
P.S.. think I have a browser cache issue, every time I visited the forum recently it showed no new posts... but theres loads Steve Wright
SWS Solutions |
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests