• Creator
  • #4007

    I am a newbie to Advansys and scripting and I am wrintg an applet and part of it grabs all addresses from the Address Book and displays them in a drop down list. A copy of the code is below.

    I would like to be able to get a count of the number of addresses in the address book and also display this info. I would also like to be able to display the Firstname and Lastname in the dropdown list rather than the Display Name. The reason for this is that people sort their address books differently. I have tried a few different methods for this, but have not been successful.

    Set objAddressBooks = GroupWise.Account.AddressBooks

    Set objAddressBook = objAddressBooks.Item(“Novell GroupWise Address Book”)

    Set BookCtl = Dlg.AddComboBoxControl
    With BookCtl
    .Caption = “Select an Alternate Contact”
    .Width = 300
    Button1Caption = “Search >>”
    For Each objAddressBookEntry in objAddressBook.AddressBookEntries
    Set objAddressBooks = nothing
    End With



  • Author
  • #6833

    Im not very good at writing formativ soltuions too, but im doing my way 🙂
    To your problem:
    I expirience, that
    returns “Firstname Lastname” / “Lastname Firstname” depending on the Client’s sort settings.
    If this doesn’t fit your needs, there are these additional AddressBookEntry propertys:
    So you can use AddressBookEntry.Firstname to retrieve the First Name seperately.

    To count the entries in an AdressBook you can youse the AdressBook property

    this will return the number of items in the AdressBook.

    This Information and more can be found in the Formativ Language Guide, supplied with the Formavit version you own.

    Tested on Groupwise 6.5 with Formativ Admin 1.6

    Hope this helps
    Greez Tom

    Support 1a

    Thank you for your input. The Object API AddressBookEntries object also has a count property you can read, but it only provides an estimate if you are reading the system address book. Here’s an extract from the documentation on Novell’s site:


    The system address book does not keep an actual count of the number of users in the book. The count that is returned is an approximate count that is based on an index count. Since the index is not updated with every delete (for performance reasons), items that have been deleted will still be included in the count until the index is rebuilt. If you want an exact count, use the AddressBook object to iterate through every entry in the book and count each iteration.

    You can find the complete documentation here.

    I hope this helps.

    Advansys Support

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