Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Events.Sources
Returns an unordered list of source IDs.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Events | 6.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
AsJSON | Available in MBS FileMaker Plugin 13.4 or newer. Pass 1 to return result as JSON. |
Optional |
Result
Returns list or error.
Description
Returns an unordered list of source IDs.Examples
Query list of sources:
MBS( "Events.Sources" )
Example result:
56001
56002
56003
56004
Queries sources and types:
While(
[
names = "";
// query list of event sources IDs
list = MBS( "Events.Sources" );
count = ValueCount(list);
index = 1
] ;
index ≤ count ;
[
id = GetValue(list; index);
// query name for each ID
name = MBS( "Events.Source.Title"; id);
type = MBS( "Events.Source.Type"; id);
names = names & name & " -> " & type & ¶;
index = index + 1
] ;
// return all the names
names )
Example result:
Auf meinem Mac -> Local
Andere -> Birthdays
Andere -> Subscribed
Mac.com -> CalDAV
Mac.com -> CalDAV
Query as JSON:
MBS( "Events.Sources"; 1 )
Example result:
[
{
"sourceTypeText" : "CalDAV",
"title" : "Mac.com",
"sourceIdentifier" : "68B72E23-6DC9-47EC-9C29-D844DB9F77BD",
"isDelegate" : false,
"sourceType" : 2
},
{
"sourceTypeText" : "Subscribed",
"title" : "Subscribed Calendars",
"sourceIdentifier" : "B52BAF80-5415-406B-8F86-EB990F30AF86",
"isDelegate" : false,
"sourceType" : 4
},
{
"sourceTypeText" : "Birthdays",
"title" : "Other",
"sourceIdentifier" : "______NativeStorePersistentID_______",
"isDelegate" : false,
"sourceType" : 5
},
{
"sourceTypeText" : "CalDAV",
"title" : "Mac.com",
"sourceIdentifier" : "780DE199-35C3-4720-9FF0-D5CB37A4B7E6",
"isDelegate" : false,
"sourceType" : 2
}
]
See also
Release notes
- Version 13.4
- Added AsJSON parameters to Events.Calendars, Events.Source.Calendars, Events.Item.GetCalendar, Events.defaultCalendarForNewEvents, Events.defaultCalendarForNewReminders, Events.SourceWithType, Events.Sources and Events.DelegateSources functions to return result as JSON.
Blog Entries
This function is free to use.
Created 10th March 2016, last changed 20th July 2023