• Creator
    Topic
  • #4022
    Marco
    Participant

      Hi,

      Groupwise 6.5 SP1, Formativ V1.6.0.8

      My applet will set a filter to the mailbox and walk throught
      the results. By accessing the category of a message I get an
      strange error. It’s not easy to reproduce it, so I hope the
      following will help:

      1. Setup 3 posted tasks
      2. Give the first one a userdefined category,
      the second no category and
      the third a userdefined category different to the first one
      3. start the following applet
      (I have reduced it, so it makes no sense, just showing the error)

      The error that I get:
      The first messagebox shows the correct category for the first task, the second
      one is empty, which is also ok, but the third will show the category of
      the first! message.
      Now set a category to the second task and start the applet again.
      Everything is working ok ?!

      Any hints?



      ‘ Formativ Macro Export Tasks


      option explicit

      Sub Main(Client, GWEvent)
      dim MailBoxObj
      dim Msg
      dim sFilter
      dim iCount
      dim iCatCount
      dim sCat
      dim i
      dim x

      groupwise.account.refresh

      sFilter = “(TASK) AND (ACCEPTED) AND (NOT COMPLETED)”

      Set MailBoxObj = GroupWise.Account.AllMessages.Find(sFilter)
      iCount = MailBoxObj.Count

      if iCount > 0 then
      for x = 1 to iCount
      set Msg = MailBoxObj.Item(x)
      if (Msg.BoxType <> 2) then
      iCatCount = Msg.Categories.Count
      select case iCatCount
      case 0
      msgbox(Msg.Subject & “: empty”)
      case 1
      set sCat = Msg.Categories.Item(1)
      msgbox(Msg.Subject & “: ” & sCat.Name)
      case else
      for i = 1 to iCatCount
      set sCat = Msg.Categories.Item(i)
      if (sCat.Primary) then
      msgbox(Msg.Subject & ” (” & i &”): ” & sCat.Name)
      end if
      next
      end select
      end if
      next
      end if
      End Sub

    • Author
      Replies
    • #6878
      Support 1
      Participant

        I cannot find anything wrong in your code.

        It may be worthwhile comparing the results you see from the applet with the categories displayed in the GroupWise client.

        We have found that the category displayed in the GroupWise user interface can differ from the category reported by the GroupWise Object API. This is a defect in the current release of the GroupWise client. A workaround is to call

          GroupWise.Refresh

        and/or set a 1-2 second delay after changing the category value in an applet.

        Perhaps the behaviour you see is related to a different GroupWise defect. Please notify this forum of your progress. We may need to inform Novell of a new defect that requires fixing.

        Advansys Support

      Viewing 1 replies (of 1 total)
      • You must be logged in to reply to this topic.