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

Calendar.Item.SetCalendar

Assigns a calendar to the calendar item.

Component Version macOS Windows Linux Server iOS SDK
Calendar 3.4 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "Calendar.Item.SetCalendar"; itemRef; calendarRef )   More

Parameters

Parameter Description Example
itemRef The reference to the calendar item. Can be reference to event or reminder. $eventRef
calendarRef The id of the calendar to query. $calendarRef

Result

Returns OK or error.

Description

Assigns a calendar to the calendar item.

Examples

Create a new reminder:

$id = MBS("Calendar.NewReminder")
$r = MBS( "Calendar.Item.SetDueDate"; $id; Get(CurrentHostTimeStamp) )
$r = MBS( "Calendar.Item.SetTitle"; $id; "Test" )
$r = MBS( "Calendar.Item.SetCalendar"; $id; "Erinnerungen" )
$r = MBS( "Calendar.SaveReminder"; $id )

Create new event:

Set Variable [$c; Value:MBS("Calendar.NewEvent")]
# set title and other variables
Set Variable [$r; Value:MBS("Calendar.Item.SetTitle"; $c; CalendarTest::ItemTitle)]
Set Variable [$r; Value:MBS("Calendar.Item.SetStartDate"; $c; CalendarTest::ItemStartDate)]
Set Variable [$r; Value:MBS("Calendar.Item.SetEndDate"; $c; CalendarTest::ItemEndDate)]
Set Variable [$r; Value:MBS("Calendar.Item.SetAllDay"; $c;CalendarTest::ItemAllDay)]
Set Variable [$r; Value:MBS("Calendar.Item.SetCalendar"; $c; CalendarTest::CalendarUID)]
# save event
Set Variable [$r; Value:MBS("Calendar.SaveEvent"; $c )]

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 31st October 2015


Calendar.Item.SetAllDay - Calendar.Item.SetCompleted