Resource Calendar

Resource Calendar as Add-on is now available: InstallResourceCalendarAddon.fmp12.zip
New! The Add-om installer contains now 2 versions, Resource Calendar and Immo Calendar. Immo Calendar is the choice if you manage bookings for i.e. rooms or flats, resources that can't be belong to more than one group.
Get install code from installer dialog €45 (PayPal).
Sample files created with the Add-ons:
ResourceCalendarSample.fmp12.zip
ImmoCalendarSample.fmp12.zip

New! Balimusic Calendar Add-on: InstallBalimusicCalendarAddon.fmp12.zip
Stripped down version of Resource Calendar to month, week, day and list views (fullcalendar views), groups as resource filters. Get install code from installer dialog €30 (PayPal).

ResourceCalendar.fmp12.zip (supporting FM19)

ResourceCalendarV4.fmp12.zip | ResourceCalendarSchedulerV4.fmp12.zip

ResourceCalendarV4Rest.fmp12.zip | ResourceCalendarSchedulerV4Rest.fmp12.zip

ResourceCalendarSchedulerV4GUI_Data.zip

20/06/06

  • Fixed unclean closed -tag, preventing source-debugging in macOS-webviewer.
  • Script getLinkCommand should now give correct result for the new FMS for Linux too.
  • Fixed color popup-menu in Event Detail wouldn't open on FMGo.

20/05/25

  • Holiday import script fixed for FM16/17 (replaced While-function with script loop)

20/05/24

  • New version supporting FM19 for calling FM-scripts from JavaScript, Card window in WebDirect
  • For server/client < 19, the WebDirect callbacks php or data api are merched into this one file
  • All setting parameter now in table "Settings", additional localization of dropdown menus in "Settings" too.
  • All sql queries are now field rename safe, getting the field and table references from $$queryJson, filled on startup
  • Additional table "Holidays" with script to fill from web service.
  • The file ResourceCalendar.fmp12 is a clone file. It gets populated with sample data from json-data in layout objects on first start, give it it's needed time;-) The file then should be based on your systems locals.

20/01/04

  • Changed length for new events takes minutes as argument ($$newlength)
  • Helper scripts to move javascript libraries to FMS web root, recreate defaults in clones
    (read Changelog-entry for further explanations)

19/12/23

  • Bugfixing
  • fixed timeline view date-range string would be off screen, when file's decimal delimiter is not "."
  • for FullCalendar views on windows (FMP), changed double click to alt + click for record creation.
  • timeline view localised dates (mm/dd for "en", dd.mm for "de"...)

19/10/01

  • Fixes for event creation in full calendar views over WebDirect on touch devices (newEventFullcal/updateEventFullcal, html-templates)

19/09/28

  • Refined timeline-view date(range) header string.
  • Fixed $calendar calc for print/publish of FullCalendar views.

19/08/24
Additional data separated Version (V4GUI_Data, Updated Versions V4 and V4Rest

  • Added Resource-bound Background-Events. They appear on every resource instance (multiple groups).
  • New button warn overlaps (warning triangle icon). If switched on, overlapping resource bookings (within and across groups) get highlighted/framed, and changes trigger a warning dialog.

19/07/10
Updated Versions V4 and V4Rest

  • recurring events now interleave with "booked" events in "timeline"-view too.
    the calculating of the needed slots is moved from Events::noverlap to script setSlots
  • new layout/table "Changelog", follow it to upgrade your integrated version.
  • due to the usage of new functionality this version needs minimal FM16.
    If you need a version compatible with pre FM16, send me a note.

19/05/12
New Versions V4 and V4Rest

  • FullCalendar (Scheduler) views based on the new v.4 framework
  • additional checkbox AllDay, no need for end-date and start-/end-time
  • V4Rest for WebDirect, using the Data API for webviewer --> FileMaker callback (FMS17+)

read the document and conversation on the FileMaker Community here: Resource-Calendar

or just read the document here as a change-log:

Here's a cleaned up and a bit enhanced version of my landscape-timeline web viewer-based calendar.

Improved FM Go touch-handling

• double-click/long-touch into grid for new event

• click on row-title for resource-detail window

• tooltips on events (FM Pro)

 

Hope it's of use

 

p.s. FM14 up, best experience in FM16

 

previous versions and week-calendar here: WeekCalendar with drag and drop

triggering thread here: Week (not weekly) Schedule

 

new Version:

• added vertical "now"-timeline. Gets actualised by rerendering of the calendar or by JS by inactivity.

• "_dragstep" now in minutes, for 1 hour set it to 60

• additional switch "_showdate": overrides "_showtime" and displays start- and end-date instead of start- and end-time, might be handy for systems allowing only full-day bookings (12:00 PM to 12:00 PM i.e.)

 

17/12/23 • added time-grid shown, when day-width allows

 

17/12/31 - happy new year!

• new switch _halfrowhandle double-booking, display in half-rows (max 2 simultaneous events) if _halfrow = 1

 

18/01/05

• enhanced version to show resources/events grouped by projects (same resource can be part of multiple projects)

• additional to my CF-based calculated webpage (layout GUI), I've integrated fullcalendar's scheduler (layout GUI Scheduler). The JS-libraries are put in table JSLibraries and the needed ones loaded into global variables on solution start. The page itself is in JSLibraries ID:12, the placeholders get substituted by the calendar-data in field GUI::HTMLScheduler. I've done a few minor tweaks in the CSS-files but most is left unrendered.

 

18/01/06

• added some language libraries to scheduler, some minor adjustments in presentation.

If you want to add some more languages, take the files from fullcalendar version 3.4, the ones from 3.8 are not compatible.

472 KB fullcalendar-3.4.0.zip

 

18/01/13

• date navigation, depending on number of displayed days

• my own FM-rendered calendar (layout GUI): reworked CSS

• FullCalendar-Scheduler (layout "GUI Scheduler"): agendaWeek- and month-view added, script to ftp-upload or mail the html-file to publish on a web server. Inject the "open source" license, if you integrate it in your solution, set the license according to your usage (open source, non commercial, get a valid commercial license: Purchase Scheduler | FullCalendar )

 

18/01/19

• added a version using JSONP and hash-change technic as shown here: Communicating with a Web Viewer in FileMaker – beezwax > blog

to minimise screen flicker. The hash-change works fine on macOS, unfortunately forces a webviewer reload on windows, so not really a win for win;-)

 

18/01/21

• added MBS-function to call the JS-functions. If MBS-plugin is installed, active and registered with a valid key, on macOS and Windows its function is used to update the calendar content. If not, on macOS the JSONP/hash-trigger is used, on Windows and iOS JSONP and webviewer-refresh is used.

 

18/01/22

• found a way around the Windows hash-trigger issue. If you add a named iframe with zero size to the html body and call the fmpURL by window.open('fmp://.....', iframename), the hash-trigger works on windows too.

 

18/01/24

• updated ResourceCalendar-file. Optimised for larger time range display and additionally integrated fullCalendar-scheduler (layout "GUI Scheduler").

18/01/25

• change in CF "ListOfDate" (make localisation independent) and "setCalendarGrid" for localised month names (set variable _months according your language by uncomment/comment/edit at Let-statement start )

18/01/27

• added language-switcher to "GUI" (en, de, fr, es). Edit "setCalendarGrid" for more localisations.

 

18/02/10

• fixed a issue when CF-framework is copied to a file with a non dot (.)-based decimal format. As html/javascript expects the dot as decimal delimiter the events won't show correct if values like "35,5" are passed into the html or opposite "35.5" is passed to a FM-script as a parameter. So I added two CFs - JSDecimal ( _value ) and FMDecimal ( _value ) - to translate between the systems. If you're sure there's no need for a translation, you can uncomment the first variant in the CF-definitions and just return the input, it might have a small impact to performance.

• fixed refresh on filter toggle

• some representation reworks, weekend background not in timeline row, weekend background also in views > 30 days, if it's large enough.

 

18/02/16

• on request added 3 additional config-variables: _bhstart, _bhend and _newlength for defining business-hours and the default length of a new event. Now the 1-day view zooms in to defined business-hours range.

 

18/02/23

• ResourceCalendar, removed unneeded refresh. In Start-script a new global variable $$showactivestate is set, if set to 1, the event gets highlighted on klick (as before), if set to 0 or empty, there's no highlighting means less refresh needed, better responsibility, special on hosted solutions.

• The drag-javascript now keeps events inside the existing resources-boundaries, it's not anymore possible to drag further down/up than there're displayed resources.

• build-date under ?-layout.

• added a simple undo-function, revert last (accidentally) dragged event.

 

18/04/01

• further refresh optimising by moving HTMLCalendar-calculation to script refresh for better control.

• support for calendar-interaction in WebDirect by calling a CWP-php file instead of the fmp-url. The php-script writes into table Tasks, and a onTimer-script reads the task-entries and run the FM-interaction-scripts. Further information under the ?.

 

18/04/07

• got GUI Scheduler working in WebDirect too. As we need the php-file on FMS anyway, why not just put the javascript-libraries there too and load them by src=...

further instructions under layout HowTo / ?.

 

18/04/21

• additional switch _centerdate. If set to 1 (in set Variable $calendar in script refresh), the date is displayed at noon above the time tag, if 0 at midnight instead of the time tag. Value is set to 1 in this file-version.

• Doubleclick/long touch for new event now respects the _dragstep and does not set the start time just to full hour.

 

18/06/21

• ResourceCalendar now renders unlimited concurrent/overlapping events, the row-space just increases as much needed. Start- and end-time has to be in 5 minutes grid for overlapping to be detected. For a smaller/larger grid, edit the auto-enter formula of Events::timestampList according to your needs. If you change it, trigger a recalculation of the field by i.e. Replace Field Contents... Events::datefrom --> formula = datefrom.

 

18/06/24

• Some bug fixing and cleanup, removed unused legacy code. Replaced the recursive CF for the timestampList-calc using Agnès Barouh's CustomList-function to avoid potential recursion limits, and substituted the system dialog on event deletion by a popover. Added unstirred calc-field overlapGrid, used in auto-enter-calcs on Events::timefrom, Events::timeto and Events::timestampList, set to 5 (min.). Change to make overlap-detection-grid wider or smaller.

 

18/08/25

• Merged resource-grouping from ResourceCalendarScheduler (a resource can only be member of 1 group), click on group-label shows group-detail-window.

• Changed WebDirect php-bridge to take filename as a parameter to work filename independent (only 1 php-file needed for multiple instances)

• Replaced all Set Field By Name with Set Field and removed GetField(). As the solution has grown in complexity, there's no benefit for integration from this anymore. It seems better to rename TOs/tables/fields temporarily to match the sample-solution for integration. Only ExecuteSQL()-functions have to be adjusted on renaming tables/TOs back, best search for occurrences in database design report.

• Some more fields changed from un-stored calculation to stored auto-enter calculations, tooltip-calculation moved to Events::fieldlist

 

18/09/02

• Added event-copying by drag&drop. Drag event while holding shift-key or activating the new button below the "undo"-button (touch-devices) horizontally in time or vertically to a other resource. Copied events are grouped by IDSeries and edits applied to the group. Event start-change is only applied to events with the same start-time.

To edit a event independently remove it from the group by clicking the series-button in the event-detail-window. You can re-attach it by clicking the greyed out series-button.

• moved needed-slots subquery to Resources-table for performance increase and FM15 compatibility.

• new button "scroll lock" for touch-devices (FMGo and WebDirect on tablets) for easier dragging.

• constrained dragging to either horizontally or vertically. For changing time and resource, do it in two steps.

 

18/09/05

• Some cleaning up. Moved common javascript-functuns to custom function jsHelper(). Reworked series-handling, moved series-events-updating to script UpdateSeries called from UpdateEventUpdateEventScheduler and Undo. Series-handling and shift-drag-copying now in Scheduler too.

 

18/10/28

• For my session at FMK2018 in Liechtenstein, I did some more cleaning, streamlining of css.

• new file ResourceCalendarMultigroup, removed fullcalendar-scheduler part.

 

• Added a join-table ResourceGroups to assign a resource to multiple groups. Set variable $$multigroup to 1 (is set in the file) to use it, or to 0 to have just one group per resource (suitable for i.e. managing buildings). Multiple groups are assigned in layout groups, single group in layout resources.

• Theres a new configuration-variable _minlength in $calendar-calc, specifying the minimal length a event can be altered by dragging the length handle.

• 2 new buttons: hide empty and ungroup. hide empty hides unbooked resources for the chosen date range, ungroup sorts/groups by resource short-name. With $$multigroup on, duplicate resource labels are hidden/empty, but there's a tooltip showing the group on hover.

 

find my FMK2018 session material (in German) here: FMK - Fachkonferenz für Entwickler, Anwender und IT-Profis | FileMaker Konferenz

 

18/11/04

• new lock-button, activated ($$edit = 0) prevents drag-altering events and double-click/long-touch event creation. $$edit is assigned to the configuration variable _edit in script refresh --> Set Variable [ $calendar...

• $$scalefactor --> _scalefactor for iPad Pros, as the webviewer reports a different screen size than FM Get-functions. Added the new released 11" and 12.9" 3rd gen. iPads.

 

18/11/14

• merged ResourceCalendar and ResourceCalendarMultigroup, means re-added fullCalendar for month-, week-, day- and list-views but not added the scheduler plugin, so there's no license needed anymore.

• updated fullcalendar to v 3.9

• added additional filter to show a single resource

• added additional languages

• merged in the mail-/publishing-functionality from ResourceCalendarScheduler

 

• new version of ResourceCalendarScheduler, added scheduler-plugin and scheduler-timeline-view to the new ResourceCalendar-version

 

18/11/21

(ResourceCalendar and ResourceCalendarScheduler)

• fixed undo capturing for fullCalendar

• added tooltips to fullCalendar

• reworked grouping toggling, when grouped by resource, the second row now shows the group short name.

 

18/12/01

• moved calculation of GUI::gDateList to script refresh.

• added "MOTW"-tag to the html-calculation for preventing script-security-warning on windows 7 (thanks to user19752for the finding, Win7 + FM16 + WebViewer --> security warning ).

• added script RegisterFMP: run this on windows, if the url-protocol is registered to the wrong FM version. It writes a file FMPurl.reg to the desktop and executes it, no need to restart FM, works instantly.

• minor fixes as detail window size on FM < 16, only refresh on Resource-/Group-detail window close, if data has changed.

 

18/12/21

• fixed scroll position jumping to top on double click under windows, resulting a new event is generated at the wrong resource. (Windows handles the default event for -tags prior to the doubleclick-event causing a click-event first.)

• fixed WebDirect sessions under Linux load the touch JS-version. Linux returns 6 for Get ( Device ), so the formula for $$isTouch "Get ( Device ) > 2" was assigning the touch-version. Changed to "Position ( "345" ; Get ( Device ) ; 1 ; 1 )".

 

19/01/12

(ResourceCalendar and ResourceCalendarScheduler)

• added recurring events. A new table RecurringEvents, shift double-click (copy button long touch) to create a recurring event. Set type (daily, weekly, monthly, yearly), interval/period, number of events or end-date. Click on the +-button in recurring event detail adds the chosen date to the Events-table and hides it from RecurringEvents-table. Deleting it from the Events-table re-shows it in the RecurringEvents. If button show recurring events ($$recurring default set in start script) in timeline-view the recurring events are shown in the first slot of the resource (no overlap detection), in fullcalendar-views they're just displayed as the "regular" events. The color is drawn with higher transparency.

• If grouping is set by resource, the group-filter is now hidden and the resource filter works by resource-ID not by the combined resource-group-ID.

 

19/01/14

• fixed double-tap for event creation in fullcalendar views on touch devices

 

19/01/19

• fixed some bugs introduced with the recurring events.

• added special recurring events like 1st friday, 3rd wednesday, last sunday. The period type gets set to monthly, if a yearly event like 1st monday is needed set period to 12.

 

19/03/02

• just a minor fix for ResourceCalendarScheduler, where in creating recurring events a wrong period value has been written.

Adam
having issues viewing the calendar in web direct Filemaker
Written by Adam on
Hi everyone every time I try to view the calendar trough web direct it does not show. After inspecting the web viewer I find it is getting a whole bunch of 404 errors. I have tried to narrow it down and it seems the nominated host address is wrong. just seems to have the name of the database rather then the hosts. Any help would be good.
Author
Written by on
My answer from the PM: Can you give some more information: Server version, platform? With server 19 there’s no target url needed anymore, before you need either the data api or php enabled/set up, get more information under „?“ For the calculation of the url, ResourceCalendar assumes you name your server (Konfiguration/Server-Name) same as your webdirect base url. I.e. you access webdirect with https://fms.mydomain.com/fmi/webd then the server name would be fms.mydomain.com. If you can’t don’t want to rename it, edit Script start Set Variable $$phpurl to return https://fms.maydomain.com best Otmar
kokorota
AWSOME!!
Written by kokorota on
Kramis!! you are my heroe!!
Nikolaus Gerweck
Feiertage
Written by Nikolaus Gerweck on
Hallo Herr Kramis, die Anwendung ist sehr schön aber auch sehr komplex. Gibt es da irgendwie die möglichkeit Feiertage einzubauen und über alles Res. hinweg anzuzeigen? Gruß und guten Rutsch Nikolaus
Admin Admin
Written by Admin on
Hallo Nikolaus Möglich ist vieles;-) Wenn sie z.B. analog Wochenenden hinterlegt werden sollen (z.B. pink), würde ich eine Feiertag Tabelle führen und beim Berechnen der Timeline-Ansicht den Hintergrund entsprechend füllen, für die FullCalendar-Ansichten Background-Events berechnen. Am einfachsten aber ist es wohl eine eigene Feiertage-Ressource zu führen und sie da als (Wiederhol)Termine eintragen. Gruss Otmar