/ Forums / Advansys Formativ / Creating Solutions with Formativ / custom fields in address book

  • Creator
  • #3924

    is it possible to add custom fields in a addressbook and import data to this fields from a *.csv file ?

    thanks for help

    greetings grit

  • Author
  • #6618
    Support 1a

    Yes, this certainly sounds possible. You can add custom fields to the address book, and you are able to programmatically add data to such a field.

    We don’t have any off the shelf applets that do this. If you are intending to develop such a system yourself, I would suggest you have a look at the examples available with Formativ Developer and Admin.

    Advansys Support



    maybe this helps. i received this code myself and i did not try out so far.

    Yes. Here is some sample code that lists the values associated with a user defined field in an address book of your choice.

    You will need to edit the value of the constants USER_DEFINED_FIELD to be the name of your field, and ADDRESS_BOOK_NAME to be the name of the address book you wish to access.

    I hope this helps.

    Advansys Support

    ‘ This sample applet will display address book entries with user defined field
    ‘ value.

    ‘ User defined field name
    const USER_DEFINED_FIELD = “uid”
    ‘ Address book name
    const ADDRESS_BOOK_NAME = “Test Book”

    ‘ Main line processing
    Sub Main(Client, GWEvent)

    dim iEntry
    dim iList
    dim iValue
    dim iFieldsObj
    dim iAddressBooksObj

    On Error Resume Next

    Set iAddressBooksObj = GroupWise.AddressBooks
    set iAddressBookObj = iAddressBooksObj.item(ADDRESS_BOOK_NAME)

    if not iAddressBookObj is nothing then
    set iList = utilities.stringlist
    iList.add(“Display Name, User defined field value”)

    for each iEntry in iAddressBookObj
    set iFieldsObj = iEntry.object.Fields
    set iFieldObj = iFieldsObj.item(USER_DEFINED_FIELD, fgwString)

    if isobject(iFieldObj) then
    iValue = iFieldObj.value
    end if

    set iFieldObj = nothing
    set iFieldsObj = nothing
    iList.add(iEntry.displayname & “, ” & iValue)

    msgbox iList.Text
    set iList = nothing
    end if

    set iAddressBookObj = nothing
    set iAddressBooksObj = nothing

    End Sub

    Support 1a

    Thank you for your contribution.

    Advansys Support

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