Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Events.Calendar.GetType

Queries type of calendar.

Component Version macOS Windows Linux Server iOS SDK
Events 6.2 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "Events.Calendar.GetType"; EKCalendar )   More

Parameters

Parameter Description Example
EKCalendar The identifier or name of the calendar. $calendar

Result

Returns text or error.

Description

Queries type of calendar.
This is actually based on what source the calendar is in, as well as whether it is a subscribed calendar.
CalDAV subscribed calendars have type CalDAV with isSubscribed being true.
Type can be: Local, CalDAV, Exchange, Birthday or Subscription.

Examples

Query calendar type by ID:

MBS( "Events.Calendar.GetType"; "51AC6CC1-C4AB-40D0-BB30-A8AAFB280ABD")

Query types of all calendars:

While(
[
    names = "";
    // query list of Calendar IDs
    list = MBS( "Events.Calendars"; "Event" );
    count = ValueCount(list);
    index = 1
] ;
    index ≤ count ;
[
    id = GetValue(list; index);
    // query name for each ID
    name = MBS( "Events.Calendar.GetTitle"; id);
    type = MBS( "Events.Calendar.GetType"; id);
    names = names & name & " -> " & type & ¶;
    index = index + 1
] ;
// return all the names
names )

Example result:
Family -> CalDAV
Holidays -> Subscription
Private -> Local

See also

Example Databases

This function checks for a license.

Created 10th March 2016, last changed 14th June 2022


Events.Calendar.GetTitle - Events.Calendar.Immutable