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


Returns the first source matching the type.

Component Version macOS Windows Linux Server iOS SDK
Events 6.2 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "Events.SourceWithType"; Type { ; AsJSON } )   More


Parameter Description Example Flags
Type The type of source.
Can be Birthdays, Local, MobileMe, Exchange, CalDAV or Subscribed.
AsJSON Available in MBS FileMaker Plugin 13.4 or newer.
Pass 1 to return result as JSON.


Returns source identifier, empty or error.


Returns the first source matching the type.
This is a convenient way to find local or iCloud source.


Query local source:

MBS( "Events.SourceWithType"; "Local" )

Find a source for a new calendar:

# We need a source to add the new calendar to. I prefer local, but newer macOS doesn't have it, so we use caldav for iCloud
Set Variable [ $source ; Value: MBS( "Events.SourceWithType"; "local" ) ]
If [ IsEmpty ( $source ) ]
    Set Variable [ $source ; Value: MBS( "Events.SourceWithType"; "caldav" ) ]
End If

Query as JSON:

MBS( "Events.SourceWithType"; "CalDAV"; 1 )

Example result:
{ "sourceTypeText" : "CalDAV", "title" : "", "sourceIdentifier" : "68B72E23-6DC9-47EC-9C29-D844DB9F77BD", "isDelegate" : false, "sourceType" : 2 }

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 24th March 2016, last changed 20th July 2023

Events.Source.Type - Events.Sources