Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

Events.SaveReminder

Saves changes to a reminder.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Events 6.2 Yes No Yes, macOS only No No

MBS( "Events.SaveReminder"; EKReminder { ; Commit } )

Parameters

Parameter Description Example value
EKReminder The reference to the reminder. $Reminder
Commit Optional
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

Result

Returns OK or error.

Description

Saves changes to a reminder.
This function attempts to save the reminder to the event store database. It returns OK if successful and error otherwise.

After a reminder is successfully saved, its fields are updated to the latest values in the database.

Examples

Create Reminder:

Set Variable [$reminder; Value:MBS( "Events.NewReminder" )]
Set Variable [$calendar; Value:Events Create Reminder::Calendar]
If [IsEmpty(Events Create Reminder::Calendar)]
    Set Variable [$calendar; Value:MBS( "Events.defaultCalendarForNewReminders" )]
End If
Set Variable [$r; Value:MBS( "Events.Item.SetCalendar"; $reminder; $calendar )]
Set Variable [$r; Value:MBS( "Events.Item.SetLocation"; $reminder; Events Create Reminder::Location )]
Set Variable [$r; Value:MBS( "Events.Item.SetTitle"; $reminder; Events Create Reminder::Title )]
Set Variable [$r; Value:MBS( "Events.Item.SetURL"; $reminder; Events Create Reminder::URL )]
Set Variable [$r; Value:MBS( "Events.Item.SetNotes"; $reminder; Events Create Reminder::Notes )]
If [IsEmpty(Events Create Reminder::TimeZone)]
    #we don't set it
Else
    Set Variable [$r; Value:MBS( "Events.Item.SetTimeZone"; $reminder; Events Create Reminder::TimeZone )]
End If
Set Variable [$r; Value:MBS( "Events.Item.SetNotes"; $reminder; Events Create Reminder::Notes )]
Set Variable [$r; Value:MBS( "Events.Reminder.SetPriority"; $reminder; Events Create Reminder::Priority )]
If [not IsEmpty(Events Create Reminder::StartDate)]
    Set Variable [$r; Value:MBS( "Events.Reminder.SetStartDate"; $reminder; Events Create Reminder::StartDate )]
End If
If [not IsEmpty(Events Create Reminder::DueDate)]
    Set Variable [$r; Value:MBS( "Events.Reminder.SetDueDate"; $reminder; Events Create Reminder::DueDate )]
End If
If [not IsEmpty(Events Create Reminder::AlarmSound) or not IsEmpty(Events Create Reminder::AlarmLocationTitle) or not IsEmpty(Events Create Reminder::AlarmLocationGeoLat)]
    Set Variable [$alarm; Value:MBS( "Events.NewAlarm" )]
    If [not IsEmpty(Events Create Reminder::AlarmSound)]
        Set Variable [$r; Value:MBS( "Events.Alarm.SetSound"; $alarm; Events Create Reminder::AlarmSound )]
    End If
    If [not IsEmpty(Events Create Reminder::AlarmLocationTitle)]
        Set Variable [$l; Value:MBS( "Events.StructuredLocation.NewLocationWithTitle"; Events Create Reminder::AlarmLocationTitle )]
        Set Variable [$r; Value:MBS( "Events.StructuredLocation.SetRadius"; $l; Events Create Reminder::AlarmLocationRadius )]
        Set Variable [$r; Value:MBS( "Events.StructuredLocation.SetGeoLocation"; $l; Events Create Reminder::AlarmLocationGeoLat; Events Create Reminder::AlarmLocationGeoLong )]
        Set Variable [$r; Value:MBS( "Events.Alarm.SetStructuredLocation"; $alarm; $l)]
        Set Variable [$r; Value:MBS( "Events.Alarm.SetProximity"; $alarm; Events Create Reminder::AlarmProximity )]
    End If
    Set Variable [$r; Value:MBS( "Events.Item.AddAlarm"; $reminder; $alarm )]
End If
Set Variable [$r; Value:MBS( "Events.SaveReminder"; $reminder ;1 )]
Show Custom Dialog ["Saved Reminder"; $r]

See also

Example Databases


Events.SaveEvent   -   Events.SelectEvent

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos