Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Events.SaveEvent
Saves changes to an event permanently.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Events | 6.2 | Yes | No | No | No | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| EKEvent | The reference to the event. | $event | |
| Span | The span to use. This event, or this and future events. Pass "This" or "Future" here. |
"This" | |
| Commit | Whether to commit. Pass 1 to commit or 0 to not commit. Default is 1. Pass 0 to batch changes together and commit with Events.Commit later. |
1 | Optional |
Result
Returns OK or error.
Description
Saves changes to an event permanently.This function attempts to save the event to the calendar database. It returns OK if successful and error otherwise. It's possible for this function to return failed. This occurs if the event wasn't dirty and didn't need saving.
After an event is successfully saved, it is also put into sync with the database, meaning that all fields you did not change will be updated to the latest values. If you save the event, but it was deleted by a different store/process, you will effectively recreate the event as a new event.
Examples
Update dates:
Set Variable [$c; Value:CalendarTest::ItemUID]
Set Variable [$r; Value:MBS("Events.Event.SetEndDate"; $c; CalendarTest::ItemEndDate)]
Set Variable [$r; Value:MBS("Events.Event.SetStartDate"; $c; CalendarTest::ItemStartDate)]
Set Variable [$r; Value:MBS("Events.SaveEvent"; $c; "this"; 1 )]
Create event:
Set Variable [$c; Value:MBS("Events.NewEvent")]
Set Variable [$r; Value:MBS("Events.Item.SetTitle"; $c; CalendarTest::ItemTitle)]
Set Variable [$r; Value:MBS("Events.Item.SetNotes"; $c; CalendarTest::ItemNotes)]
Set Variable [$r; Value:MBS("Events.Item.SetURL"; $c; CalendarTest::ItemURL)]
Set Variable [$r; Value:MBS("Events.Item.SetLocation"; $c;CalendarTest::ItemLocation)]
Set Variable [$r; Value:MBS("Events.Event.SetStartDate"; $c; CalendarTest::ItemStartDate)]
Set Variable [$r; Value:MBS("Events.Event.SetEndDate"; $c; CalendarTest::ItemEndDate)]
Set Variable [$r; Value:MBS("Events.Event.SetAllDay"; $c;CalendarTest::ItemAllDay)]
Set Variable [$r; Value:MBS("Events.Event.SetAvailability"; $c; "busy")]
Set Variable [$r; Value:MBS("Events.Item.SetCalendar"; $c; CalendarTest::CalendarUID)]
Set Variable [$r; Value:MBS("Events.SaveEvent"; $c; "this"; 1 )]
Set Field [CalendarTest::ItemUID; MBS("Events.Item.CalendarItemIdentifier"; $c)]
See also
- Events.Commit
- Events.Event.SetAllDay
- Events.Event.SetAvailability
- Events.Event.SetEndDate
- Events.Event.SetStartDate
- Events.Item.SetCalendar
- Events.Item.SetLocation
- Events.Item.SetTitle
- Events.RemoveEvent
- Events.SelectEvent
Example Databases
Blog Entries
FileMaker Magazin
Created 10th March 2016, last changed 24th March 2016
Events.SaveCalendar - Events.SaveReminder
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins