DayBackForFileMaker

Create Events

How can I create events for a specific source?

If you have multiple sources in the calendar we follow a simple rule to determine in which source an event is created:

You can set a default source for new events in the script "Load Calendar Settings - On Startup..."
If only one source is visible (is turned on in the Sources tab) then we create the event in that source.
If multiple sources are shown, and the default source is among them, we use the default source.
If multiple sources are shown, and the default source is NOT among them, we use the first visible source.

Can I make event records from outside the calendar, such as from portals on my other layouts?

Absolutely. In fact, you'll see an example of this on our Sample Contacts layout where we have a "new event for contact" button. That button calls one of the scripts in the calendar specifically set up to receive commands from your other layouts (or even other files).

The script is called "Create Edit Delete Event ( SourceNo ) { Operation , DateStart , DateEnd , TimeStart , Resource... }" and it can take any number of parameters to let you manipulate events using your own scripts.

In our Sample Contacts example we send the following parameters to create a new record for the contact we're looking at:

#("sc_SourceNo" ; 1) &
#("sc_Operation" ; "Create") &
#("sc_ContactID" ; SampleContacts::id) &
#("sc_DateStart" ; Get ( CurrentDate ))

Read the comments at the beginning of this script to learn about other parameters you can send to this script. If you need to create event records from other layouts, or as part of scripted processes (like "create a followup call for this contact two weeks from today"), this script is your friend.

(855) SEEDCODE
[email protected]
Follow us: