# IDataSource.GetList()

Description:

The `GetList` method retrieves a list of available calendars or calendar entries. Calendar entries are retrieved from the specified calendar or, if no calendar is specified, from the default one.

This is a synchronous method.

Syntax:

    result = so.IDataSource.GetList(criteria);

Arguments:

- `criteria`:

  This is an object that specifies what calendar information is returned. For more information about the object properties and how to define them, see section Criteria for retrieving calendar information.

Return value:

The `GetList` method returns an object that contains the requested calendar information, an error code, and an error message.

Table: Return value properties for GetList
Property | Description | Value
--- | --- | ---
`result.ReturnValue` | This is an iterator that contains the requested calendar information. | See Returned calendar information.
`result.ErrorCode` | This is a number that specifies a predefined error code. | See Service API error codes.
`result.ErrorMessage` | This is a text string that describes the error. | See Calendar Service API error messages.

Remarks:

- If entries are retrieved from a calendar other than the default one, the corresponding calendar file must exist on the device.

- For detailed information about calendar entries, see section Calendar entries.

Example code:

For the complete source of a sample widget that demonstrates how to use this Service API, see the full example.