Table of Contents

TTMSFNCCustomPlanner.AddOrUpdateItem Method

Adds a new item or updates an existing item in the current resource.

API unit family: TMSFNCPlanner Declaring type: TTMSFNCCustomPlanner

Overloads

Overload 1

Adds a new item or updates an existing item in the current resource.

function AddOrUpdateItem(AStartTime, AEndTime: TDateTime; ATitle: String; AText: String; AItemIndex: Integer = -1): TTMSFNCPlannerItem; overload; virtual;

Parameters

Name Description
AStartTime Start date and time for the item.
AEndTime End date and time for the item.
ATitle Title text assigned to the item.
AText Body text assigned to the item.
AItemIndex Index of the item to update, or -1 to add a new item.

Returns

The added or updated planner item.

Overload 2

Adds a new item or updates an existing item for a resource index.

function AddOrUpdateItem(AResource: Integer; AStartTime, AEndTime: TDateTime; ATitle: String = ''; AText: String = ''; AItemIndex: Integer = -1): TTMSFNCPlannerItem; overload; virtual;

Parameters

Name Description
AResource Resource index assigned to the item.
AStartTime Start date and time for the item.
AEndTime End date and time for the item.
ATitle Title text assigned to the item.
AText Body text assigned to the item.
AItemIndex Index of the item to update, or -1 to add a new item.

Returns

The added or updated planner item.

Overload 3

Adds a new item or updates an existing item for a named resource.

function AddOrUpdateItem(AResourceName: String; AStartTime, AEndTime: TDateTime; ATitle: String = ''; AText: String = ''; AItemIndex: Integer = -1): TTMSFNCPlannerItem; overload; virtual;

Parameters

Name Description
AResourceName Resource name resolved against the planner resources collection.
AStartTime Start date and time for the item.
AEndTime End date and time for the item.
ATitle Title text assigned to the item.
AText Body text assigned to the item.
AItemIndex Index of the item to update, or -1 to add a new item.

Returns

The added or updated planner item.