Events.Item.SetCalendar
-----------------------

Sets the calendar for the event.

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

MBS( "Events.Item.SetCalendar"; EKCalendarItem; EKCalendar ) 

**MBS**( **"Events.Item.SetCalendar";** /\* Sets the calendar for the event. \*/  
**$EKCalendarItem**; /\* The reference to the calendar item: an event or reminder.e.g. $item \*/   
**$EKCalendar**) /\* The identifier or name of the calendar.e.g. $calendar \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EKCalendarItem | The reference to the calendar item: an event or reminder. | $item |
| EKCalendar | The identifier or name of the calendar. | $calendar |

### Result

Returns OK or error.

### Description

Sets the calendar for the event.  
You can pass calendar by ID or by name.  
### Examples

Set calendar:

 Set Variable \[$r ; Value:MBS ( "Events.Item.SetCalendar"; $reminder ; $calendar )\]  
### See also

- [Calendar.Item.SetCalendar](CalendarItemSetCalendar.md)
- [Events.Item.GetCalendar](EventsItemGetCalendar.md)
- [Events.NewEvent](EventsNewEvent.md)
- [Events.NewReminder](EventsNewReminder.md)
- [Events.RemoveCalendar](EventsRemoveCalendar.md)
- [Events.SaveEvent](EventsSaveEvent.md)
- [Events.SaveReminder](EventsSaveReminder.md)

### Release notes

- **Version 8.0**
    - Changed [Events.Item.SetCalendar](http://www.mbsplugins.eu/EventsItemSetCalendar.shtml) to pick reminder calendar by name if you edit reminder and not an events calendar.

### 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_)
- [Mac and iOS/Events/Events Sync](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Sync.shtml#5ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 8.0pr7](https://www.mbsplugins.de/archive/2018-01-10/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [FileMaker and Calendar (iCal)](https://www.mbsplugins.de/archive/2016-04-23/FileMaker_and_Calendar_(iCal)/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 3/2020, Seite 39](https://filemaker-magazin.de/neuigkeit/4096-Appetithappen-FMM_202003)

This function checks for a license.

Created 10th March 2016 , last changed 4th January 2022

  
[Events.Item.RemoveRecurrenceRule](EventsItemRemoveRecurrenceRule.md) - [Events.Item.SetLocation](EventsItemSetLocation.md)

[HTML Version](EventsItemSetCalendar.shtml)