GetTasks

Description

Gets an array of tasks from Pocket Outlook after optionally filtering the array for matching criteria.

Applies to

POOM objects

Syntax

Integer objectname.GetTasks ( {matchcriteria,} contacts [ ] )

Argument

Description

objectname

The name of the POOM object

matchcriteria

A string describing criteria you want to use to filter the list of tasks

contacts

An array of POOMTasks passed by reference

Returns

Integer. Returns 1 for success and one of the following negative values if an error occurs:

Usage

A user must be logged in to a POOM object to get tasks from Pocket Outlook.

Examples

Example 1

The following example retrieves tasks that match the criterion that the priority be high:

li_rtn = g_poom.getTasks &
    ("[Importance]='ImportanceHigh!'", myTasks [] )

Example 2

The following example retrieves all the tasks in the list and writes the subject and start date of each task to a list box:

integer li_rc
POOMTask taskArray[]
POOMTask task
DateTime  dt
int idx

li_rc = g_poom.GetTasks( taskArray )

FOR idx=1 to UPPERBOUND(taskArray)
   task = taskArray[idx]
   lb_res.AddItem( "Subject: " + task.Subject )
   lb_res.AddItem( "Starts: " + task.StartDate )
NEXT

lb_res.SelectItem( lb_res.TotalItems() )

See also