• Creator
    Topic
  • #3971
    Anonymous

    Is there any way using Formativ / GW object API to find out if a user has chosen to have a signature / not to have a signature and to be prompted / not to be prompted to use a signature each time?

  • Author
    Replies
  • #6739
    Support 2
    Moderator

    Unfortunately, after reviewing the GroupWise Token APIs, it does not appear possible to identify the current signature preferences. The preferences appear to be stored in the account, which makes sense, but means you cannot use a work-around like reading the Windows registry.

    You can use the Token API command PrefSignature to set the signature options. The following is taken from the Formativ Language Guide.

    quote:


    PrefSignature Method

    Description
    Sets the signature that is appended to every message sent. Version: GroupWise 5.x and later.

    Syntax
    GroupWise.PrefSignature(SigOptions eInclude, AddSignature Boolean, AddVCard Boolean, SignatureText String)

    Parameter Useage:

    SigOptions eInclude
    Specifies the signature include option.

    Value Description
    incNo
    incYes
    incPrompt

    AddSignature Boolean

    AddVCard Boolean

    SignatureText String
    Return notification options.

    Remarks
    Only available in GroupWise 5.5 and later.


    What do you wish to achieve?

    Regards,

    Advansys Support

    #6744
    Anonymous

    We are not impressed with the multiple signatures applet as it does not allow you to create or edit them (you need a text editor), so I have written my own. It performs the same way as the original, but also allows you to create and edit them, as well as selecting a default.

    As a possible enhancement, I wanted to tap into the signature prefs and add the default signature to my list of available signatures, and then see if they want to apply the signature with / without prompting, and perform that action accordingly.

    The thing is that I cannot do that unless I can access those properties (the signature, the to apply / not to apply, the prompt / not to prompt) through the GW object API.

    As a separate issue, the original applet performed a default action if the shift key was held down as the applet icon was clicked. How do you detect if the shift key is being pressed?

    #6734
    Anonymous

    Currently, I’m building my signature using the attribute values that I get from the E-Dir. But would like to build a signature by taking attribute values like Name, Title and so on from the addressbook. Can you let me know how I can do this?

    #6735
    Support 1
    Participant

    Here is some sample code to:

    • Determine whether the [Shift] key is down.
    • Retrieve Address Book entry attributes.
    Sub Main(Client, GWEvent)
     
     dim oField
     dim oEntry
     dim oFieldObj
     dim oAddressBook
     
    
     ' Determines whether a key is up or down at the time the function is called.
     if Utilities.KeyIsDown(VK_SHIFT) then
        Msgbox("Shift Key Pressed")
     end if
     
    
     set oAddressBook = GroupWise.Account.AddressBooks.Item("Novell GroupWise Address Book")
     
     if oAddressBook is nothing then
       exit sub
     end if
     
    
     ' We are getting an entry using the index value
     set oEntry = oAddressBook.AddressBookEntries.Item(1)
     if oEntry is nothing then
       exit sub
     end if
     
     msgbox "Name: " & oEntry.DisplayName
     msgbox "Email Address: " & oEntry.EmailAddress
     
     ' You can access all the properties using the fields collection. The sample code
     ' accesses the first item in the collection. See GroupWise Object API documentation for
     ' more details.
     ' http://developer.novell.com/ndk/doc/gwobjapi/index.html?gwobjenu/data/h7ikbsqg.html
     set oFieldObj = oEntry.Fields
     
     set oField = oFieldObj.Item(1)
     if not oField is nothing then
       msgbox (oField.value)
     end if
     
    
     set oEntry = nothing
     set oFieldObj = nothing
     set oField = nothing
     set oAddressBook = nothing
     
    End Sub
    

    Advansys Support

    #6740
    Anonymous

    Thanks for the help Supports 2 and 3. The applet has been deemed a success, even if it cannot interact with the GroupWise signature.

    #6742
    Support 2
    Moderator

    Thanks for the feedback, which is good news. We agree about the current limitations of the Multiple Signatures applet. Expect to see significant enhancements to many of the Business Solutions Pack applets in the future.

    One catalyst enabling these future improvements will be the new capabilities in the Formativ 1.7 development product and runtime engine. If you are interested in reviewing the private early preview beta of the new release, please send an email to sales@advansyscorp.com.

    Regards,

    Advansys Support

    #6745
    Anonymous

    I would be very interested in testing the new version. I will send an email ASAP.

    By the way, as I have written the completed applet, I was wondering how to share the new applet with the community?

    #6741
    Support 1
    Participant

    You may share an applet via Cool Solutions, a website-based support community for products by Novell & other vendors.

    If you wish to share a Formativ applet, you can submit it directly to Cool Solutions (see instructions here). Or send it to Advansys at Support@advansyscorp.com, and we will submit it to Cool Solutions on your behalf. Either way, Cool Solutions requires approval of your applet from Advansys.

    Advansys Support

    #6736
    jeka
    Participant

    Hi,

    I have problems with the syntax for GroupWise.PrefSignature. I will disable the signature for all users. Thanks for help!

    Best Regards

    #6738
    Support 1a
    Participant

    I have used this command like this:

    Sub Main(Client, GWEvent)
    
       call Groupwise.PrefSignature(incNo, false, false, "")
    
    End Sub

    What problem are you experiencing?

    Regards,

    Advansys Support

    #6737
    jeka
    Participant

    Thanks for this example. Its for my applet with Multi-Signature!

    Bests Regards

    #6743
    Support 1a
    Participant

    No problems – good luck.

    Advansys Support

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