Tables

When creating a table with Visual Basic, reference the table or item within it as an instance of a specific object. This object is a representation of the abstract table or item type. For example, when creating an appointment, you create an instance of an Appointment object.

Schedule+ defines an Appointments table that contains all appointments within a user’s schedule file. Each row of the Appointments table is an Appointment item that contains a set of properties you can get and set. Properties defined on an Appointment object include Start and OwnerName.

In some cases, a property itself can be a table. For example, an Appointment object might include the Attendees property, which returns a table that contains all the attendees for the appointment.

The following figure shows the Table object hierarchy for the preceding examples.

To support operations on tables, the Schedule+ Automation interface defines methods and data members common to all tables.

Instances of tables have the following data members.

Data Member Description
AccessPermitted Returns access control information for items in a table.
Application Returns an Application object.
ChangeNumber Returns the current change number of the table.
Class Returns the data type of the property.
IsEndOfTable Returns whether the cursor position is at the end of the table.
Name Returns the name of the table object.
Parent Returns to an object’s parent.
Position Returns the current cursor position in the table.
Rows Returns the number of rows in the table.

Instances of tables have the following methods.

Method Description
DeleteItem Deletes an item from the table.
GetRows Retrieves a two-dimensional array of properties where each row corresponds to an item and each column corresponds to the specified name or property identifier.
Item Returns the Item object to which the cursor points.
New Creates a new item in the table.
Reset Sets the current item cursor to the top of the table.
SetChangeIndex Positions the cursor so that the rows following the cursor have change indexes greater than the specified value.
SetRange Restricts the table to a specified date range.
SetRestriction Sets a restriction on a table. Does not work for merged tables.
Skip Skips a specified number of rows forward or backward in the table.