/ Forums / Advansys Formativ / Creating Solutions with Formativ / Personalized Subject
-
CreatorTopic
-
March 1, 2005 at 3:32 am #4114
How can I find the data content from the field “personalized subject” and “catagory”
Thanks for help
-
CreatorTopic
-
AuthorReplies
-
March 1, 2005 at 5:09 pm #7141
Thank you for your enquiry.
Below is an example of how one might use the GroupWise Object API from Formativ to obtain the Subject, Personal Subject and Categories from the open Message View.
Please note that Personal Subject and Categories are message properties which became available in GroupWise 6.5 and later.
Sub Main(Client, GWEvent) dim iPerSubject, iSubject, iText dim oCategories, oCategory dim oMsg set oMsg = nothing set oMsg = Client.ClientState.CommandMessage if not (oMsg is nothing) then iSubject = "Subject: " & oMsg.Subject.PlainText iPerSubject = "Personal Subject: " & oMsg.PersonalSubject iText = "" set oCategories = oMsg.Categories if not (oCategories is nothing) then if oCategories.Count > 0 then for each oCategory in oCategories iText = iText & "Category: " & oCategory.Name & vbNewLine next else iText = vbNewLine & iText & "No categories" end if end if iText = iSubject & vbNewLine & iPerSubject & vbNewLine & iText else iText = "Message not found" end if MsgBox iText End Sub
For more information about the Object API see this online reference.
I hope this helps you.
Advansys Support
[This message was edited by Support 3 on March 01, 2005 at 05:20 PM.]
March 2, 2005 at 8:14 am #7140Thank you for this information. Can I write the data content for the PersonalSubject when I send a new Mail?
Thanks for help
March 2, 2005 at 3:27 pm #7142The Mail property PersonalSubject is only available using the GroupWise Object API, which unfortunately does not provide a means to access a message during the Send event.
You might wish to consider the following approach.
- Before sending, a user manually marks a message as requiring a personal subject. For example, the user could enter the special text “[[PS]]” in the message subject.
- Create an applet which executes on the event On Message Arrival (for the GroupWise Application, not Mail, etc), and
- Uses GroupWise.Account.MailBox.FindMessages() to filter for a message which is unread; whose message type is, for example, Mail; box type is incoming and subject contains “[[P]]”, and
- Sets the personal subject using the syntax oMsg.PersonalSubject = “My Personal Subject”, and
- Sets oMsg.Read = false, because accessing/changing the message can implicitly set Read = true (which will confuse the user).
I hope this helps you.
Advansys Support
March 7, 2005 at 1:37 pm #7146Thanks for your answer. My problem however is that I would like to enter the personal subject within the sent item directly after sending it. Do you have any ideas? Thank you in advance for your help.
Kind regards
March 7, 2005 at 2:26 pm #7144Unfortunately, the OnSend event occurs at a point in time before the final message ID of the outgoing message is available. This means you cannot easily identify the outgoing message’s message ID, which you would need in order to customize the Personal Subject. This problem has been present for many years, and is one we have asked Novell to address many times.
The only workaround is to collect key information about the message being sent (i.e. subject, date, etc), wait a short period, then locate the message in the sent items folder that matches the criteria. Once located, use the object API to update the PersonalSubject.
I hope this helps.
Advansys Support
April 6, 2005 at 7:05 am #7143Hi,
thanks for your informations. How can I create a category and set to aktiv?
Thank you for helpKind regards
April 6, 2005 at 7:05 pm #7145 -
AuthorReplies
- You must be logged in to reply to this topic.