Editing in Your Own FileMaker Layout
Overview
By default, DayBack displays your events in its built-in popover:
While you can add new fields to the Custom Fields drawer, if you have a lot of fields, you might prefer to use your own layout instead of DayBack's popover.
Option 1: Use Your Own Layout Instead
You can bypass DayBack's built-in popover entirely and go straight to your layout in a card window. Here’s how:
- Ensure that the layout you select is based on the same table occurrence as the source you're working on.
- In DayBack's admin settings, click the "Validate..." button to confirm that you've selected a layout name that will work.
Option 2: Go To Your Layout From DayBack's Popover
You can jump to your own layout from the action drawer in DayBack's popover. This is helpful if you want to preview the event in DayBack before editing it in your own layout.
The button action for this behavior is included in DayBack's Sample Events source and you can copy it from there to any of your own sources. The syntax is...
dbk.navigate('Event Detail', event)
...where 'Event Detail' is the name of the layout you want go to. This layout has to be based on the same table occurrence as the event's calendar source. You can find and make this button here:
Option 3: Open a Card Window from DayBack's Popover
Opening a card window is a great option for those who like DayBack's built-in popover but want to sometimes see more fields, portals, or their own FileMaker layout objects when editing an event. You can bring up your layout in a card window when clicking a button in the action drawer:
Any edits you make in the popover are saved before the card window comes up, and the card window edits are saved again before you're returned to the popover. The syntax is...
dbk.showEventOnLayout('Event Detail', editEvent)
...where 'Event Detail' is the name of the layout you want bring up. This layout has to be based on the same table occurrence as the event's calendar source. You can find and make this button the same way as the button in option 2.
Going The Other Way
From your layout to opening the event in DayBack
To navigate to an event in the calendar from your own layout, run the script "Show Event on Calendar - DayBack" script and pass the following parameter, replacing "MyTable::MyStartDateField
" with the start date field, and "MyTable::MyIdField
" with the id field of your record.
You'll find an example of this script on the "Project Detail" layout in DayBack: the arrow-button in the events portal calls this script.
JSONSetElement ( "{}" ; [ "date" ; MyTable::MyStartDateField ; JSONString ]; [ "id" ; MyTable::MyIdField ; JSONString ] )