DayBackForFileMaker

Your Own Event Layouts

DayBackForFileMaker.YourOwnEventLayouts History

Hide minor edits - Show changes to output

May 19, 2023, at 04:50 PM by 192.88.134.15 -
Changed lines 28-29 from:
%center% %newwin width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png | https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png]]
to:
%center% %newwin width=440% [[https://archive.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png | https://archive.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png]]
Changed lines 34-35 from:
%center% %newwin width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png | https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png]]
to:
%center% %newwin width=440% [[https://archive.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png | https://archive.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png]]
Changed line 53 from:
%center% %newwin width=440%  [[https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png | https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png]]
to:
%center% %newwin width=440%  [[https://archive.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png | https://archive.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png]]
March 29, 2021, at 06:39 PM by KC Embrey - Added #delete
Changed line 49 from:
!! Update the calendar view after deleting a filemaker record?
to:
[[#delete]]!! Update the calendar view after deleting a filemaker record?
May 07, 2019, at 10:24 PM by 192.88.134.15 -
May 07, 2019, at 10:24 PM by 192.88.134.15 -
Added lines 42-44:
!! Using a split-view

If you want to edit your event in FileMaker (or include FileMaker objects like portals on your event) but don't want to leave the calendar to edit. You could consider editing your events in a split view as demonstrated in this mod (instructions and example file included): %newwin% [[https://www.seedcode.com/customizing-filemaker-calendar-split-view/ |adding a split view]].
April 11, 2017, at 06:53 PM by 192.88.134.15 -
Changed line 7 from:
https://www.youtube.com/watch?v=nxi8abtlBn0
to:
%newwin% [[https://youtu.be/nxi8abtlBn0]]
March 31, 2017, at 09:55 PM by 192.88.134.15 -
Changed lines 18-26 from:
!! What if the layout I want to use is in my own file?

That's actually pretty easy to handle. You'll still edit the script "Load Source Settings at Startup --- Describe Your Sources Here ---" to tell
DayBack that you'd like to use a FileMaker layout for one of your sources (watch the movie above or edit that script after the comment "Should we show event details using a FileMaker layout? Boolean - True or False").

Then
you'll edit the script "Show Event Details From WebViewer" adding the four lines shown below to call a script in ''your'' file, passing in the ID of the event you clicked on as the script parameter $eventID.

%center% %newwin width=440% [[https://www
.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]

Note that the lines shown above are shown in
the "edit" branch of the "Show Event Details From WebViewer" script; you could add the same kind of branch to the "create" section right above it.
to:
!! What if the layout I want to use is in my own file, and I've just linked DayBack instead of embedding it?

No problem: that's actually pretty easy to handle. The instructions which follow are for
DayBack version 9.97 and later, so [[VersionHistory | be sure you're up to date]] before continuing.
 
You'll still
edit the script "Load Source Settings at Startup --- Describe Your Sources Here ---" to tell DayBack that you'd like to use a FileMaker layout for one of your sources (watch the movie above or edit that script after the comment "Should we show event details using a FileMaker layout? Boolean - True or False").

You'll then edit two scripts
.

'''1
.''' Edit the script "Show Event Details From WebViewer" adding the five lines shown below to call a script in ''your'' file, passing in the ID of the event you clicked on as the script parameter $eventID.

%center% %newwin width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png | https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents2.png]]

Th script you call in your file should take the event ID that's passed in and perform a find for that event. Be sure to end your script with "Select Window [Current Window]" to bring your file's window into focus. This takes care of viewing an event when you click on it in the calendar. Next we'll take care of creating new events.

'''2.''' Next, edit the script "Submit Event From WebViewer" and add the seven lines shown here:

%center% %newwin width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png | https://www.seedcode.com/rootimages/stikipad/dayback/ShowEvents3.png]]

The script parameter needs to contain all the information you'll need to create a new event and the easiest way to get that is to copy the parameter DayBack is passing into the "Create, Edit..." script in line 99. That parameter use the "hash" custom functions, so you'll want to add those three custom functions from DayBack to your file.

Check out the DayBack script "Create, Edit..." to see how you can use the functions to extract variables and for one example of what a new record creation script could look like. Note that "Create, Edit..." deals with editing and deleting as well: the script in your file just needs to make the new event so it can be much simpler. Editing (like dragging an event in the calendar) and deleting are still done in DayBack's scripts, in the DayBack file.

Be sure to end your script with "Select Window [Current Window]" to bring your file's window into focus
.
December 21, 2016, at 08:40 PM by KC Embrey - Added #OwnFile anchor
Added line 17:
[[#OwnFile]]
March 09, 2015, at 08:28 PM by 142.4.217.187 -
Added lines 6-7:

https://www.youtube.com/watch?v=nxi8abtlBn0
February 25, 2015, at 09:49 PM by 142.4.217.188 -
Changed line 33 from:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png
to:
%center% %newwin width=440%  [[https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png | https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png]]
February 25, 2015, at 09:48 PM by 142.4.217.188 -
Changed line 21 from:
%newwin% %width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
to:
%center% %newwin width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
February 25, 2015, at 09:46 PM by 142.4.217.188 -
Changed line 21 from:
%newwin% %center width=400px% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
to:
%newwin% %width=440% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
February 25, 2015, at 09:45 PM by 142.4.217.188 -
Changed line 21 from:
%newwin% %center width=400% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
to:
%newwin% %center width=400px% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]
February 25, 2015, at 09:45 PM by 142.4.217.188 -
Added lines 14-23:

!! What if the layout I want to use is in my own file?

That's actually pretty easy to handle. You'll still edit the script "Load Source Settings at Startup --- Describe Your Sources Here ---" to tell DayBack that you'd like to use a FileMaker layout for one of your sources (watch the movie above or edit that script after the comment "Should we show event details using a FileMaker layout? Boolean - True or False").

Then you'll edit the script "Show Event Details From WebViewer" adding the four lines shown below to call a script in ''your'' file, passing in the ID of the event you clicked on as the script parameter $eventID.

%newwin% %center width=400% [[https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png | https://www.seedcode.com/rootimages/stikipad/dayback/showevents.png]]

Note that the lines shown above are shown in the "edit" branch of the "Show Event Details From WebViewer" script; you could add the same kind of branch to the "create" section right above it.
February 24, 2015, at 11:32 PM by 142.4.217.187 -
Added lines 18-19:

!! Update the calendar view after deleting a filemaker record?
February 24, 2015, at 11:31 PM by 142.4.217.187 -
Changed line 19 from:
If you would like to update the calendar view when deleting a record the easiest way is to add a script step to the "On Event Record Load" script. This script is called on a layout script trigger "OnRecordLoad" and is run whenever an event record loads (this includes when an event is deleted) in our included event detail layouts. Simply add a Perform Script "Refresh Webviewer" script step inside the if statement as shown in the image below.
to:
If you would like to update the calendar view when deleting a record the easiest way is to add a script step to the "On Event Record Load" script. This script is called on a layout script trigger "OnRecordLoad" and is run whenever an event record loads (this includes when an event is deleted) in our included event detail layouts. Simply add a Perform Script "Refresh Calendar" script step inside the if statement as shown in the image below.
February 24, 2015, at 11:31 PM by 142.4.217.187 -
Changed lines 19-23 from:
If you would like to update the calendar view when deleting a record the easiest way is to add a script step to the "On Event Record Load" script. This script is called on a layout script trigger "OnRecordLoad" and is run whenever an event record loads (this includes when an event is deleted) in our included event detail layouts. Simply add a Perform Script "Refresh Webviewer" script step inside the if statement as shown in the image below.
to:
If you would like to update the calendar view when deleting a record the easiest way is to add a script step to the "On Event Record Load" script. This script is called on a layout script trigger "OnRecordLoad" and is run whenever an event record loads (this includes when an event is deleted) in our included event detail layouts. Simply add a Perform Script "Refresh Webviewer" script step inside the if statement as shown in the image below.

%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/refresh-after-delete.png

We add the exit script step after we call the refresh script because the rest is unnecessary if we run that script first
.
February 24, 2015, at 11:30 PM by 142.4.217.188 -
Changed lines 19-29 from:
To remove an event from the calendar view just pass a few parameter values into the script "Refresh Calendar Event (Data ; {EventID ; RenderID ; QueryID ; Operation ; ForceRefresh} )".

So an example of a parameter for that script might look like:

#
("sc_Data" ; "") &
#("sc_EventID" ; $sc_EventID
) &
#("sc_Operation" ; "delete")

I would suggest duplicating the "Close Event Window &
Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; RenderID ; QueryID ; Operation ; ForceRefresh} )" to what is shown above. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.

Make sure to remove or change any on record load script triggers that might interfere with the script as that trigger will run when deleting a record
.
to:
If you would like to update the calendar view when deleting a record the easiest way is to add a script step to the "On Event Record Load" script. This script is called on a layout script trigger "OnRecordLoad" and is run whenever an event record loads (this includes when an event is deleted) in our included event detail layouts. Simply add a Perform Script "Refresh Webviewer" script step inside the if statement as shown in the image below.
February 24, 2015, at 10:31 PM by 142.4.217.188 -
Changed lines 17-19 from:
If you choose to use your own layout rather than DayBack popovers you may want to manage when event changes show up on the calendar. This is ultimately handed by the script "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". This script takes event data and an event ID and updates the  event display on the calendar. This script should be run after the event window is closed so it is executed from the context of the calendar layout. For an example we use the script "Close Event Window & Refresh Calendar" on our "To Do Details" layout to update the event on closing the window. We recommend copying the "Close & Refresh Calendar" button off of that layout and using it on your layouts as it calls that script and is a great starting point.

To remove an event from the calendar view just pass a boolean false statement into the data
parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.
to:
If you choose to use your own layout rather than DayBack popovers you may want to manage when event changes show up on the calendar. This is ultimately handed by the script "Refresh Calendar Event (Data ; {EventID ; RenderID ; QueryID ; Operation ; ForceRefresh} )". This script takes event data and an event ID and updates the  event display on the calendar. This script should be run after the event window is closed so it is executed from the context of the calendar layout. For an example we use the script "Close Event Window & Refresh Calendar" on our "To Do Details" layout to update the event on closing the window. We recommend copying the "Close & Refresh Calendar" button off of that layout and using it on your layouts as it calls that script and is a great starting point.

To remove an event from the calendar view just pass a few
parameter values into the script "Refresh Calendar Event (Data ; {EventID ; RenderID ; QueryID ; Operation ; ForceRefresh} )".

So an example of a parameter for that script might look like:

#(
"sc_Data" ; "") &
#("sc_EventID" ; $sc_EventID) &
#("sc_Operation" ; "delete")

I would suggest duplicating the "Close Event Window & Refresh Calendar
" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; RenderID ; QueryID ; Operation ; ForceRefresh} )" to what is shown above. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.
December 11, 2014, at 12:24 AM by 98.203.211.206 -
Changed lines 19-21 from:
To remove an event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.
to:
To remove an event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.

Make sure to remove or change any on record load script triggers that might interfere with the script as that trigger will run when deleting a record
.
December 11, 2014, at 12:19 AM by 98.203.211.206 -
Changed line 19 from:
To remove an event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. This edit would delete the record, close the window, and then update the calendar view to reflect the deleted event.
to:
To remove an event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. Then remove the "If" statement that wraps that script step as we don't need to check for record modification when deleting. These changes will change the script to delete the record, close the window, and then update the calendar view to reflect the deleted event.
December 11, 2014, at 12:00 AM by 98.203.211.206 -
Changed lines 15-17 from:
If you choose to use your own layout rather than DayBack popovers you may want to manage when event changes show up on the calendar. There is a script called "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". This script takes event data and an event ID and updates the  event display on the calendar. This script should be run after the event window is closed. For an example we use the script "Close Event Window & Refresh Calendar" on our ToDo Detail layout to update the event on closing the window. We recommend copying the close button off of that layout and using it on your layouts.

To remove an
event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button.
to:
!! How do I show event changes immediately on the calendar?

If
you choose to use your own layout rather than DayBack popovers you may want to manage when event changes show up on the calendar. This is ultimately handed by the script "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". This script takes event data and an event ID and updates the  event display on the calendar. This script should be run after the event window is closed so it is executed from the context of the calendar layout. For an example we use the script "Close Event Window & Refresh Calendar" on our "To Do Details" layout to update the event on closing the window. We recommend copying the "Close & Refresh Calendar" button off of that layout and using it on your layouts as it calls that script and is a great starting point.

To remove an event from
the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button. Then changing the "Data" parameter when calling "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )" to a false value. This edit would delete the record, close the window, and then update the calendar view to reflect the deleted event.
December 10, 2014, at 11:46 PM by 98.203.211.206 -
Changed lines 13-17 from:
You'd also select your layout in the script "Load Source Settings at Startup --- Describe Your Sources Here ---" after the comment "Which layout should we use to display event details for this source?". Be sure to run the upon opening script after editing that Source Settings script.
to:
You'd also select your layout in the script "Load Source Settings at Startup --- Describe Your Sources Here ---" after the comment "Which layout should we use to display event details for this source?". Be sure to run the upon opening script after editing that Source Settings script.

If you choose to use your own layout rather than DayBack popovers you may want to manage when event changes show up on the calendar. There is a script called "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". This script takes event data and an event ID and updates the  event display on the calendar. This script should be run after the event window is closed. For an example we use the script "Close Event Window & Refresh Calendar" on our ToDo Detail layout to update the event on closing the window. We recommend copying the close button off of that layout and using it on your layouts.

To remove an event from the calendar view just pass a boolean false statement into the data parameter for "Refresh Calendar Event (Data ; {EventID ; QueryID ; ForceRefresh} )". So that would be either False or 0. I would suggest duplicating the "Close Event Window & Refresh Calendar" script and adding a delete record before the close window script step for your delete button.
Changed line 11 from:
No. You can certainly use your own. Just reference your layout in any [[custom action]] scripts that need to land on your layout (our example script, "Go To Event Record from Webviewer" uses our "Action - View Event" layout but can certainly use yours.
to:
No. You can certainly use your own. Just reference your layout in any [[custom actions | custom action]] scripts that need to land on your layout (our example script, "Go To Event Record from Webviewer" uses our "Action - View Event" layout but can certainly use yours.
Changed lines 11-27 from:
No. You can certainly use your own. There are just a few things to keep in mind.

'''Event List'''

-> There are a few script steps that reference this layout (such as when you wish to see repeating events as a list) so rename
''your'' event list layout to "Event List" before importing the scripts in your [[integration]]. After the scripts are in you can rename your layout back to whatever you'd named it before.

'''Event Details'''

-> The event details layout is
the one we go to when clicking on an event in the calendar and when making a new one from within the calendar. Thus a lot more scripts point to this layout.

->This is a mini window (a small window) so you can still see calendar events behind it while you're editing the event: we also kept it small because we bring up several of these small windows when you click on a conflicting event.

-> So, you may want to keep our Event Details layout even if you already have one, since it can be convenient to have a small, quick reference version of the event. What many people do is add a button to our Event Details layout (which is fully customizable, by the way) which jumps to their larger Event Details layout...

!! Making New Records

In order for you to arrive at your own layout when you ''create'' an event on the calendar, edit the script "Create Edit Delete Event ( SourceNo ) { Operation , Hide, DateStart , DateEnd , TimeStart ... }" and find the comment "--------- Create -------". A few steps after that you'll see a go to layout command: change that to your layout and you'll be all set.
to:
No. You can certainly use your own. Just reference your layout in any [[custom action]] scripts that need to land on your layout (our example script, "Go To Event Record from Webviewer" uses our "Action - View Event" layout but can certainly use yours.

You
'd also select your layout in the script "Load Source Settings at Startup --- Describe Your Sources Here ---" after the comment "Which layout should we use to display event details for this source?". Be sure to run the upon opening script after editing that Source Settings script.
Deleted lines 23-28:

!! Can I jump right from the Event Details layout to my own event layout?

Yes, we've built a script for this already. Simply add a new button to the Event Details layout and call the script "Jump to Event in My Layout ( EventID )" using your Event ID as the script parameter (just send the ID itself, not "EventID..." ).  Then edit this script to use ''your'' event ID field and the layout of your choice to display event details.

This is very similar to the script we use to [[JumpToMyContact | jump to your contact's layout]].
Changed lines 1-2 from:
%color=red% >> How to use your own event layouts a) instead of a popover, b) as a supplement to a popover with Custom Actions.
to:
!! Using Your Own Layouts Instead of Webview Popovers

You can configure DayBack to use your own layout instead of the
popover. Alternately, you can preview your event in a webviewer popover and then jump to your own layout using a custom action when you need more detail.

This video describes how to set up both options. Setting up the "custom actions" described in the video is detailed here: [[Custom Actions]].

(:youtube nxi8abtlBn0 width=500:)
Added lines 1-3:
%color=red% >> How to use your own event layouts a) instead of a popover, b) as a supplement to a popover with Custom Actions.

(855) SEEDCODE
[email protected]
Follow us: