• Creator
    Topic
  • #5148
    jeka
    Participant

      Hello,

      I have problems since the new Groupwise 2012. With the GW 2012-Client, my results of oEntries = nothing. With the GW 8 Client is the result OK
      Any Idea?

      set oAddressBook = GroupWise.Account.AddressBooks.Item(“Novell GroupWise Adressbuch”)
      iUserId = Groupwise.EnvUserID()
      set oEntries = oAddressBook.AddressBookEntries.Find(“(<Email-Adresse> CONTAINS “”” & iUserId & “””)”)
      if oEntries is nothing then
      msgbox “oEntries is nothing. Quitting”
      set oAddressBook = nothing
      set oFolder = nothing
      set iMsg = nothing
      set iMessageClass = nothing
      set gStatusDlg = nothing
      exit sub
      end if

      Best regards
      Jens

    • Author
      Replies
    • #9877
      Support 3
      Participant

        Thanks for your post.

        Is “Novell GroupWise Adressbuch” System Address Book?

        Based on Novell documentation, you can search only “First Name” & “Last Name” in System Address Book. See below extract from Find() method documentation.

        quote:

        This Find method differs from the Find methods for messages in that it accepts a restricted syntax and does not accept a saved Filter. Each address book may support a different set of filtering operations. Filtering on an address book that supports a limited set of operations will throw an exception when handed a filter expression beyond the address book’s capabilities. This method does not support BEGINSWITH, but it does support MATCHES and CONTAINS.

        You can search only on First Name and Last Name in the System Address Book. If you try searching on Name, this method fails.

        However, our internal test shows we was able to search Email Address in System Address Book entries in GroupWise 8.0.3 (build date 15/06/2012) but not in GroupWise 2012. Following code works in GroupWise 8/2012 System Address Book.

          
        set oAddressBook = GroupWise.Account.AddressBooks.Item("Novell GroupWise Address Book")
        iFilter = "(<First Name> CONTAINS ""Test"")"
        set oAddresses = oAddressBook.AddressBookEntries.Find(iFilter)
        

        In your code you have used “<Email-Adresse>”, in English client its “<E-Mail Address>”. We are not sure AddressBook keywords are language-dependent.

        Hope this helps.

        Regards,

        Advansys Support

        #9878
        jeka
        Participant

          Thank you for the feedback. Your example does not work with my GW 12-client! With german and also english version.

          set oAddressBook = GroupWise.Account.AddressBooks.Item(“Novell GroupWise Addressbook”)
          iUserId = Groupwise.EnvUserID()
          iFilter = “(<First Name> CONTAINS “”Jens””)”
          set oEntries = oAddressBook.AddressBookEntries.Find(iFilter)
          if oEntries is nothing then
          msgbox “oEntries is nothing. Quitting”
          set oAddressBook = nothing
          set oFolder = nothing
          set iMsg = nothing
          set iMessageClass = nothing
          set gStatusDlg = nothing
          exit sub
          end if

          Do you have another idea?

          Best regards
          Jens

          #9879
          Support 3
          Participant
            quote:
            set oAddressBook = GroupWise.Account.AddressBooks.Item(“Novell GroupWise Addressbook”)

            Generally System Address Book name is “Novell GroupWise Address Book” but we can see in your system “Novell GroupWise Addressbook” [without space in Addressbook]. Don’t think it could be an issue.

            Does the code works in another Address Book?

            We had to update your above sample code for Address Book name then it works in here. We used GroupWise 12.0.1 (build date 07/09/2012).

            See below slightly modified code, which shows Address Book name & Type (2 for System Address Book) and prefix wildcard character in name.

             
              set oAddressBook = GroupWise.Account.AddressBooks.Item("Novell GroupWise Address Book")
            
              if (not oAddressBook is nothing) then
                msgbox "Name: " & oAddressBook.Name  & ", Type: " & oAddressBook.ObjType
                iFilter = "(<First Name> CONTAINS ""*John*"")"
                set oEntries = oAddressBook.AddressBookEntries.Find(iFilter)
            
                if oEntries is nothing then
                  msgbox "oEntries is nothing. Quitting"
                elseif (oEntries.count > 0) then
                  msgbox oEntries.item(1).DisplayName
                end if
              end if
            

            Regards,

            Advansys Support

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