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.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Events.NewReminder

Creates a new reminder.

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

MBS( "Events.NewReminder" )

Parameters

none

Result

Returns reminder ID or error.

Description

Creates a new reminder.

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.NewEvent   -   Events.Object.HasChanges

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos