/ Forums / Advansys Formativ / Creating Solutions with Formativ / LastName property problem in Dutch Groupwise (part 2)

  • Creator
    Topic
  • #3879
    rleurs
    Participant

    What I’m trying to say:

    The applet for adding an entry to an addressbook runs fine on W2K US with US Groupwise client. But it dies on the line .LastName=… on WinME Dutch with Dutch Groupwise 6.0.0 client.It gives an error message:

    Poging om niet gedefinieerde veldnaam op item te gebruiken at line …. column ….

    Which means trying to use an undefined field name on an item. It’s seems that the Dutch version of Groupwise doesn’t understand the LastName property of an AddressBookEntry object. But changing the property name gives a messages about an unsupported propery or method.

    How can I get a list of properties of the AddressBookEntry object in my Dutch Groupwise client? What is wrong here? Any suggestions?

    Kind regards,
    Roland Leurs
    T-Systems Nederland.

  • Author
    Replies
  • #6472
    Support 1a
    Participant

    It appears that the native field name for the last name field is not being correct translated. We have not had this reported previously, so I am not entirely sure why this would be the case. Formativ 1.5 uses a different technique when handling different language field definitions, so this issue should not be a problem.

    To work around the issue, you need to determine the internal name for the last name field in the Dutch client. The following applet shows all the internal field names for the given book. Execute it and make a note of the last name field as displayed:

    Sub Main(Client, GWEvent)

    Dim iAddressBooks
    Dim iAddressBook
    Dim iObject
    Dim iFieldDefs
    Dim iFieldDef

    Set iAddressBooks = GroupWise.AddressBooks
    Set iAddressBook = iAddressBooks.Item("test2")
    Set iObject = iAddressBook.Object

    for each iFieldDef in iObject.FieldDefinitions
    MsgBox iFieldDef.Name
    next

    End Sub

    You then need to use the AddressBookEntry.Object property to access the native address book entry, then use the extact field name you obtained from the applet above to write the last name to the entry. I have modified your applet to show how this is done. Note that you will have to change the text “Last Name” with the Ducth string as output by the applet shown above:

    const egwString = 1

    Sub Main(Client, GWEvent)

    Dim AddressBooks
    Dim AddressBook
    Dim oAddressBookEntries
    Dim oAddressBookEntry
    Dim iObject

    Set AddressBooks = GroupWise.AddressBooks
    Set AddressBook = AddressBooks.Item("Test Book")

    if IsEmpty(AddressBook) then
    MsgBox("Could not locate that address book")
    else
    MsgBox(AddressBook.Name)

    Set oAddressBookEntry = AddressBook.AddContact("Bill Smith")
    oAddressBookEntry.FirstName = "Bill"

    ' Get the native GroupWise address book entry object
    set iObject = oAddressBookEntry.Object

    on error resume next
    call iObject.Fields.Add("Last Name", egwString, "Smith")

    end if

    Set AddressBooks = nothing
    MsgBox("Done")

    End Sub

    I hope this helps.

    Advansys Support

    #6474
    rleurs
    Participant

    Thanks,

    Yes, using the call iObject.Fields.Add(….) method works fine. The same problem appeared also with the comments, home phone and cell phone properties.

    Thanks again for your quick response and exellent service!

    Kind regards,
    Roland Leurs
    T-Systems Nederland

    #6473
    Support 1a
    Participant

    You are welcome.

    Advansys Support

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