/ Forums / Advansys Formativ / Creating Solutions with Formativ / Looping Through All Appointment Recipients

  • Creator
    Topic
  • #4461
    mickeyd
    Participant

      Hi,

      I’m hoping you can help me debug this problem I’m stuck on or perhaps suggest an alternative solution.

      I’m trying figure out a way to loop through all recipients of a Groupwise Appointment (in an applet executed on the composing item just before OnSend) in order to verify if the user has ‘invited’ more than one meeting room (resource) and then popup a warning message.

      Initially, I was looking for a way to loop through all recipients and determine if the account is of type resource rather than a user. But I’ve not found any property than can tell me this.

      As a workaround, I go get a list of all room names from a database and put it in an array, then loop through all recipients and compare if the name is on my list of rooms. This works ok, but I’ve hit a bump in my testing. When sending an appointment booking to a large group of people (it’s not unusual to invite 200+ people to some presentations), the Groupwise.ItemGetText function always truncates the list at roughly 104-109 names (not always the same number, or roughly 2015 characters in string length), with the last name in the list ending with an ellipsis (…)

      Why does it truncate there and how can I see the remainder of the list items?
      [We are running Groupwise 7.0.3 with Formativ 2.0]

      Simplified code excerpt:


      strRecipients = GroupWise.ItemGetText(“X00”, itfTo)
      arrRecipients = Split(strRecipients, “;”, -1, 1)

      For each recipient in arrRecipients
      For each room in arrAllRoomsFromDB
      If Trim(recipient = Trim(room) Then
      intCountRooms = intCountRooms + 1
      End If
      Next
      Next


      If I do a MsgBox(UBound(arrRecipients)), even though I have 200+ recipients, it pops up a name from the middle of the list with an ellipsis (eg. Fred Flintstone(…))

      Is there a better way to go about this? It is a fairly slow process (about 12 seconds to loop through the 100 or so users in the [truncated] list, would be twice as long otherwise), but I’ve not found any other way. Any suggestions would be appreciated.

    • Author
      Replies
    • #8232
      Support 3
      Participant

        Sorry for the delay.

        quote:


        Groupwise.ItemGetText function always truncates the list at roughly 104-109 names


        Looks a bug in Token API ItemGetText function. You may need to post a bug report in Novell: http://forums.novell.com/novell/product-neutral/developers/

        Another workaround could be use the Object API. In order to access the Object API you will need to save the message, so steps are:

        – Save the message to Work-In-Progress folder. You can call the Groupwise.ItemSaveMessageDraft() to save the message so user don’t get prompt to choose folder.
        – Access the saved message and Recipients collection.
        – Iterate each Recipient object. Object API Recipient object will provide you more information, for example: EmailAddress, EmailType, etc.
        – You can access Recipient.Address object which will provide you ObjType (egwUser, egwResource, etc).

        The forum post below has example source code to save message in Work folder:

        http://www.advansyscorp.com/forums/topic/269109397/

        Hope this helps.

        Regards,

        Advansys Support

        #8233
        mickeyd
        Participant

          Thank you, I finally did get that to work using the Object API.

          It was a bit of a challenge in a bilingual work environment as the folder path to send to the Groupwise.ItemSaveMessageDraft function must be in the user’s language, however the Groupwise.Account.WorkFolder.Name function only returns the English value.

          So it seems I may have to resort to hard-coding the strings for our French users, which may cause some errors down the road.

          After much trial and error, I found that in the version of Groupwise that we have (GW7), the workfolder path needs to be:

          (English)
          folderPath = Groupwise.Account.Owner.DisplayName & ” – HomeWork in Progress”

          (French)
          folderPath = Groupwise.Account.Owner.DisplayName & ” – AccueilTravail en cours”

          This doesn’t seem to be documented anywhere, so maybe this will save someone else a headache or two…

          Thanks for your help.

          #8234
          Support 3
          Participant

            Thanks for sharing this information.

            This is known behaviour of the Object API, you can find more discussion of this issue in this post:

            http://www.advansyscorp.com/forums/topic/5361082971/

            Regards,

            Advansys Support

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