/ Forums / Advansys Formativ / Creating Solutions with Formativ / GroupWise Account Name in Apllet Form

  • Creator
    Topic
  • #4393
    Serhan
    Participant

    Hey Guys,

    I have developed a graphical form for “requesting holiday” , that will be sent to the chef in GroupWise. I would like if the applet starts automatically name and department of the
    GroupWise users logged in over? how can I
    solve that?

    thank you

  • Author
    Replies
  • #8061
    Support 3
    Participant

    In order to access the login user’s DisplayName, EmailAddress, etc properties, you will need to use the “GroupWise.account.owner” to access the Address object. See the Object API for for information: http://developer.novell.com/documentation/gwobjapi/index.html?gwobjenu/data/h7ikbsqg.html

    To access the address book entry properties (i.e. department, address, etc), you will need to access the AddressBookEntry object. See the sample code below which pass the Address object to access the AddressBookEntry object then it iterate the available fields.

      
      dim owner
      dim oABEntry
      dim oAddressBook
    
      ' Get the system address book
      set oAddressBook = groupwise.account.addressbooks.item("Novell GroupWise Address Book")
    
      ' Get the login user address object
      set owner = GroupWise.account.owner
      msgbox owner.displayname
    
    
      ' Get the address book entry object which contains more properties (i.e. fields)
      set oABEntry = oAddressBook.AddressBookEntries.item(owner)
    
      ' Iterate available fields of the address book entry
      for each oField in oABEntry.Fields
        msgbox "Field name: " & oField.name & vbcrlf & "Field value: " & oField.value
      next
    
      set oABEntry = nothing
      set owner = nothing
      set oAddressBook = nothing
    

    Regards,
    Advansys Support

    #8058
    Serhan
    Participant

    thanks for your answer, it helps me a lot..

    i get the owner.displayname in msgbox prompted, but i need the value in my fieldNameChange Box..

    i tried this:

    Sub Main(Client, GWEvent)

    holiday.ShowModal()

    dim owner

    ‘Get the login user address object
    set owner = GroupWise.account.owner
    set fieldNameChange = owner.displayname

    Sub fieldNameChange(Sender)

    End Sub

    But no luck, do you have an Idea ?

    thx

    #8059
    Support 3
    Participant

    If the fieldNameChange is edit control then you need to set the TEXT property. See the object inspector for available properties.

    MainDlg.fieldNameChange.text = owner.displayname
    holiday.ShowModal()

    You may also need to set the edit control properties before displaying the form. Please see the Developers Guide for more information about developing solution using Formativ.

    Regards,
    Advansys Support

    #8060
    Serhan
    Participant

    Thanks very much..

    it works great.. but now i have one onther problem..

    ‘ Date Function

    I want that the users have the chance to put their start date and their end date in two fiels.. But i like to realize this like i ve seen in other formativ applets… i want my two fields with a drop down icon also which shows the visual calender of groupwise, and the users can select their start and end dates…

    I hope you understand my function..

    Thanks, Serhan

    #8062
    Support 3
    Participant

    You will need to add the DateTimePicker to your form. Open Form Designer, select Win32 tab then drop DateTimePicker to your form.

    We will recommend you to take a look at the Formativ Example applets. The example applets below represent a cross section of the type of solutions that can be written using Formativ applets. Formativ Creator and Studio users are free to use these applets and modify them as required. You can download the Formativ Example Applets Pack installer from the Formativ Download page:
    http://www.advansyscorp.com/formativ_example_applets.htm

    Regards,
    Advansys Support

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