Events.NewAlarm
---------------

Creates a new alarm.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Events](component_Events.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Events.NewAlarm" ) ### Parameters

none

### Result

Returns reference number or error.

### Description

Creates a new alarm.  
Returns a reference number starting with 56000.  
### Examples

Add alarm:

 Set Variable \[$alarm ; Value:MBS ( "Events.NewAlarm" )\]  
If \[not IsEmpty(Events Create Reminder::AlarmSound )\]  
 Set Variable \[$r ; Value:MBS ( "[Events.Alarm.SetSound](EventsAlarmSetSound.md)"; $alarm ; Events Create Reminder::AlarmSound )\]  
End If  
If \[not IsEmpty(Events Create Reminder::AlarmLocationTitle )\]  
 Set Variable \[$l ; Value:MBS ( "[Events.StructuredLocation.NewLocationWithTitle](EventsStructuredLocationNewLocationWithTitle.md)"; Events Create Reminder::AlarmLocationTitle )\]  
 Set Variable \[$r ; Value:MBS ( "[Events.StructuredLocation.SetRadius](EventsStructuredLocationSetRadius.md)"; $l ; Events Create Reminder::AlarmLocationRadius )\]  
 Set Variable \[$r ; Value:MBS ( "[Events.StructuredLocation.SetGeoLocation](EventsStructuredLocationSetGeoLocation.md)"; $l ; Events Create Reminder::AlarmLocationGeoLat ; Events Create Reminder::AlarmLocationGeoLong )\]  
 Set Variable \[$r ; Value:MBS ( "[Events.Alarm.SetStructuredLocation](EventsAlarmSetStructuredLocation.md)"; $alarm ; $l )\]  
 Set Variable \[$r ; Value:MBS ( "[Events.Alarm.SetProximity](EventsAlarmSetProximity.md)"; $alarm ; Events Create Reminder::AlarmProximity )\]  
End If  
Set Variable \[$r ; Value:MBS ( "[Events.Item.AddAlarm](EventsItemAddAlarm.md)"; $reminder ; $alarm )\]  
### See also

- [Events.Alarm.SetProximity](EventsAlarmSetProximity.md)
- [Events.Alarm.SetRelativeOffset](EventsAlarmSetRelativeOffset.md)
- [Events.Alarm.SetSound](EventsAlarmSetSound.md)
- [Events.Alarm.SetStructuredLocation](EventsAlarmSetStructuredLocation.md)
- [Events.NewAlarmWithAbsoluteDate](EventsNewAlarmWithAbsoluteDate.md)
- [Events.NewAlarmWithRelativeOffset](EventsNewAlarmWithRelativeOffset.md)
- [Events.NewReminder](EventsNewReminder.md)
- [Events.SaveReminder](EventsSaveReminder.md)
- [Events.StructuredLocation.SetGeoLocation](EventsStructuredLocationSetGeoLocation.md)
- [Events.StructuredLocation.SetRadius](EventsStructuredLocationSetRadius.md)

### Example Databases

- [Mac and iOS/Events/Events Create Event](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Event.shtml#1ScriptAnchor_)
- [Mac and iOS/Events/Events Create Reminder](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Reminder.shtml#1ScriptAnchor_)

This function checks for a license.

Created 10th March 2016 , last changed 29th April 2023

  
[Events.Item.lastModifiedDate](EventsItemlastModifiedDate.md) - [Events.NewAlarmWithAbsoluteDate](EventsNewAlarmWithAbsoluteDate.md)

[HTML Version](EventsNewAlarm.shtml)