
Notes can be a great way to communicate with your team about rescheduling suggestions or to tag events with additional information that a team should see before attending a meeting.
Notes visibility and editing capabilities can also be restricted to specific users or to events with specific statuses or event types. This allows you to use the notes for the workflow scenarios where notes make sense while reducing on-screen clutter for event types where notes are unnecessary.
Download and Install
You can download the code here. Before installing the app actions, you must define a custom field to store your notes either at the source level, or the specific calendars or objects where you want notes available. The app action will show notes icons only for events with this field available.
Configuration
FileNames:
In the configuration section of the app action, you must define the Field Name of the Custom Field that contains notes for each calendar. If you have multiple sources and all share the same field name, simply declare this as a string variable:
inputs.notesFieldName = 'notes';
If you have multiple sources with different field names for each source, declare the noteFilename setting as an object containing the calendar name, and the field name that is applicable to that calendar:
inputs.notesFieldName = { 'Marketing': 'notesFieldName1', 'Sales': 'notesFieldName1', }
Icon Colors:
By default, events without a note will show an off-white comment icon inside of the colored event pill. The app action will take the current color of the event and brighten the color so that it stands out in your events without being overly obtrusive. You can override this feature by seeing a hard color, like white or black for empty cells, and then changing the default color for events which have a note attached. On Horizon view the icons will be displayed next to the text rather than the colored event pill. You will therefore need to specify a hard default color, as the app action will not attempt to reuse the event color for the icon, since the icon is not overlayed over the event pill. You can configure colors as follows:
// Define default icon color when a notes exists inputs.iconColorWithNote = "#0000AA"; // Define default icon color for events without a note. // The default is to leave this empty, which will automatically paint // empty icons with 150% brightness of existing event color inputs.iconColorWithoutNote = ""; // Define default icon for empty notes cells in Horizon view. // Since notes icons are not displayed within the event pill, but inside // the text portion, coloring by event color would be misleading users // into assuming there is a note. Leave this set to white by default. inputs.horizonIconColorWithoutNote = "#FFFFFF";
Rules that Govern Notes Eligibility:
By default, all events are eligible for notes if you have defined a notes field for that source. If you would like to exclude some events, you may define a custom exclusion function that must return false if an event should be excluded.
An exclusion function can be useful if you only want some user accounts to have the ability to comment, or if comments should be allowed only in certain event statuses. If you don’t want to restrict comments, simply remove this function, or have it always return true.
Useful Filters:
// Exclude all-day events in resource view let isResourceView = inputs.currentView.name.match(/resource/i); return event.allDay == true && isResourceView ? false : true; // Exclude events in Completed Status return event['status'].includes('Completed') ? false : true; // Allow for specific users return inputs.currentUser == 'John' || inputs.currentUser == 'Ann' ? true : false;
Ways to Customize this Action
App actions like this can also be modified to send an email when a note is written. You can also use this feature as a way of locking events until a note is cleared. This would require creating an On Event Save and On Event Delete app action that would prevent changes until a note has been cleared. This feature can also be extended to set different icons or label colors if you want to quickly flag events in special ways.
Summary
We hope this gives you some inspiration for ways you can use an app action like this to drive productivity. We’d love to hear your ideas of what would make DayBack event easier to use. If you have questions about customizing or creating new features, please get in touch with our team. We’d love to help.
Nice, is this code can be integrated in the classic version of Dayback.
Mostly I want to be able to display a note, not edit it. Right now I have a hover action that show some content I need, but hover a note action will allow me to add a specific part of the info from that event.
Thanks
Unfortunately, this isn’t available in DayBack Classic. While Classic has tooltips (https://archive.seedcode.com/pmwiki/index.php?n=DayBackForFileMaker.Tooltips), this mod relies on an improvement to tooltips that is only available in the currently shipping version of DayBack. I imagine you could include more content in your current tooltip, or add a button (https://archive.seedcode.com/pmwiki/index.php?n=DayBackForFileMaker.CustomActions) to open your info in a card window.