/ Forums / Advansys Formativ / Creating Solutions with Formativ / Signature preferences
-
CreatorTopic
-
October 22, 2003 at 3:00 am #3971Anonymous
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?
-
CreatorTopic
-
AuthorReplies
-
October 22, 2003 at 5:33 am #6739
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
incPromptAddSignature 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
October 22, 2003 at 6:19 am #6744AnonymousWe 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?
October 22, 2003 at 7:47 am #6734AnonymousCurrently, 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?
October 22, 2003 at 7:44 pm #6735Here 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
October 23, 2003 at 3:22 am #6740AnonymousThanks for the help Supports 2 and 3. The applet has been deemed a success, even if it cannot interact with the GroupWise signature.
October 23, 2003 at 3:33 am #6742Thanks 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
October 23, 2003 at 5:51 am #6745AnonymousI 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?
October 23, 2003 at 8:09 pm #6741You 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
July 26, 2005 at 3:28 am #6736Hi,
I have problems with the syntax for GroupWise.PrefSignature. I will disable the signature for all users. Thanks for help!
Best Regards
July 26, 2005 at 4:28 pm #6738I 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
July 27, 2005 at 2:32 am #6737Thanks for this example. Its for my applet with Multi-Signature!
Bests Regards
July 27, 2005 at 4:20 pm #6743No problems – good luck.
Advansys Support
-
AuthorReplies
- You must be logged in to reply to this topic.