Events.Calendar.SetSource
-------------------------

Sets the source for a new calendar.

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

MBS( "Events.Calendar.SetSource"; EKCalendar; EKSource ) 

**MBS**( **"Events.Calendar.SetSource";** /\* Sets the source for a new calendar. \*/  
**$EKCalendar**; /\* The identifier or name of the calendar.e.g. $calendar \*/   
**$EKSource**) /\* The reference to the source.e.g. $Source \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EKCalendar | The identifier or name of the calendar. | $calendar |
| EKSource | The reference to the source. | $Source |

### Result

Returns OK or error.

### Description

Sets the source for a new calendar.  
You need to save the changes to be persistent.  
  
See [Events.Sources](EventsSources.md) to get all IDs for sources.  
### See also

- [Events.Calendar.GetColor](EventsCalendarGetColor.md)
- [Events.Calendar.GetSource](EventsCalendarGetSource.md)
- [Events.Calendar.GetTitle](EventsCalendarGetTitle.md)
- [Events.Calendar.GetType](EventsCalendarGetType.md)
- [Events.Calendar.SetColor](EventsCalendarSetColor.md)
- [Events.Calendar.SetTitle](EventsCalendarSetTitle.md)
- [Events.SaveCalendar](EventsSaveCalendar.md)
- [Events.Sources](EventsSources.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#4ScriptAnchor_)

This function checks for a license.

Created 12nd March 2016 , last changed 4th January 2022

  
[Events.Calendar.SetColor](EventsCalendarSetColor.md) - [Events.Calendar.SetTitle](EventsCalendarSetTitle.md)

[HTML Version](EventsCalendarSetSource.shtml)