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?
October 22, 2003 at 5:33 am #6739Support 2Moderator
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.
Sets the signature that is appended to every message sent. Version: GroupWise 5.x and later.
GroupWise.PrefSignature(SigOptions eInclude, AddSignature Boolean, AddVCard Boolean, SignatureText String)
Specifies the signature include option.
Return notification options.
Only available in GroupWise 5.5 and later.
What do you wish to achieve?
Advansys SupportOctober 22, 2003 at 6:19 am #6744Anonymous
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?October 22, 2003 at 7:47 am #6734Anonymous
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?October 22, 2003 at 7:44 pm #6735Support 1Participant
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 SupportOctober 23, 2003 at 3:22 am #6740Anonymous
Thanks 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 #6742Support 2Moderator
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 firstname.lastname@example.org.
Advansys SupportOctober 23, 2003 at 5:51 am #6745Anonymous
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?October 23, 2003 at 8:09 pm #6741Support 1Participant
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 SupportJuly 26, 2005 at 3:28 am #6736jekaParticipant
I have problems with the syntax for GroupWise.PrefSignature. I will disable the signature for all users. Thanks for help!
Best RegardsJuly 26, 2005 at 4:28 pm #6738Support 1aParticipant
I have used this command like this:
Sub Main(Client, GWEvent) call Groupwise.PrefSignature(incNo, false, false, "") End Sub
What problem are you experiencing?
Advansys SupportJuly 27, 2005 at 2:32 am #6737jekaParticipant
Thanks for this example. Its for my applet with Multi-Signature!
Bests RegardsJuly 27, 2005 at 4:20 pm #6743Support 1aParticipant
No problems – good luck.
- You must be logged in to reply to this topic.