Teamtask problem (Outlook library)

Discussion in 'Bug Reports' started by blue_wardrobe, Jul 3, 2008.

  1. blue_wardrobe

    blue_wardrobe Member Licensed User

    When I update a Teamtask value [via Basic4PPC], the value doesn't actually change.

    I can edit the Teamtask flag, however, from Oxios ToDoList. The value can be read ok by Basic4PPC.

    Interestingly, neither do Teamtask values sync through ActiveSync.

    (WM6 Smartphone / Q9M)
    Last edited: Jul 4, 2008
  2. blue_wardrobe

    blue_wardrobe Member Licensed User

    Code to illustrate Teamtask problem

    Before running, ensure there is no task with subject "AAAAAAAA" .

    On both WM6 Standard and WM6.1 Professional, this code shows how you can initially set Teamtask, but not change it thereafter.

    Am I doing something wrong, or is it Basic4PPC, or something else?


  3. Erel

    Erel Administrator Staff Member Licensed User

    For some reason the TeamTask property doesn't get updated if it is the only property that was changed.
    This happens in the underlying API and not in Basic4ppc code.
    One workaround is to change the Body property and then return it to the original value:
    mytask.TeamTask = false
    temp = mytask.Body
    mytask.Body = 
    mytask.Body = temp
    BTW, you can replace your loops with:
    i = tcol.FindItem("Subject","AAAAAAAA")
    If i > -1 then
      mytask.value = tcol.GetItem(i)
    End If
  4. blue_wardrobe

    blue_wardrobe Member Licensed User


    Thanks, Erel!

    That explains the weirdness.

    I am aware of the looping - I back engineered my test instrument from a much bigger piece of code that scans all tasks for certain conditions.

  5. blue_wardrobe

    blue_wardrobe Member Licensed User

    Tweak to Erel's solution

    :DErel's tweak works, except in the common situation that the task body is already empty, in which case the API doesn't see mytask.body as changing, and therefore doesn't update teamtask when update is called.

    So you need to do:

    mytask.teamtask = false
    temp = mytask.body
    if mytask.body="" then mytask.body="XYZZY" else mytask.body=""
    mytask.body = temp

    There is nothing magic about "XYZZY". Or is there...? :D

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice