• Anonymous
  • Login
  • Register
OpenNTF Productivity Extensions for Notes - Feature Request: View email conversation by subject


Hi All,

I am looking for a mechanism where I could see all emails on a common topic, together. I also realised that the given view of Mail Threads fails horribly in giving what is required. I thought and found that the best way to get mail threads using the subject. Then I started hunting for such a code (since I cannot write code to save my skin!! ). I found something but it seems to break every now and then and I just cant seem to find out why?

Details of this code: Obtained from http://www-128.ibm.com/developerworks/lotus/library/clean-subject/

I have modified the original code to suit my internal email subject prefixes that get added in my company:

My Smarticon code:
-----------
shortsubject:=Subject;
@If(@Contains(shortsubject; "Re:");
@Set("shortsubject"; @RightBack(shortsubject; "Re:"));"");

@If(@Contains(shortsubject; "RE:");
@Set("shortsubject"; @RightBack(shortsubject; "RE:"));"");

@If(@Contains(shortsubject; "<.FW.>");
@Set("shortsubject"; @RightBack(shortsubject; "<.FW.>"));"");

@If(@Contains(shortsubject; "AG:");
@Set("shortsubject"; @RightBack(shortsubject; "AG:"));"");

@If(@Contains(shortsubject; "WG:");
@Set("shortsubject"; @RightBack(shortsubject; "WG:"));"");

@If(@Contains(shortsubject; "Fwd:");
@Set("shortsubject"; @RightBack(shortsubject; "Fwd:"));"");

@If(@Contains(shortsubject; "Fw:");
@Set("shortsubject"; @RightBack(shortsubject; "Fw:"));"");

@If(@Contains(shortsubject; "FW:");
@Set("shortsubject"; @RightBack(shortsubject; "FW:"));"");

@If(@Contains(shortsubject; "Wtr:");
@Set("shortsubject"; @RightBack(shortsubject; "Wtr:"));"");

REM {remove leading, trailing, and dup blanks:};
@Set("shortsubject"; @Trim(shortsubject));

@Command([OpenView];"BySubject"; shortsubject)
--------------------

In the new view that I have created (called BySubject), the following code has been used for the column called CleanSubject

--------------------
shortsubject:=Subject;
@If(@Contains(shortsubject; "Re:");
@Set("shortsubject"; @RightBack(shortsubject; "Re:"));"");

@If(@Contains(shortsubject; "RE:");
@Set("shortsubject"; @RightBack(shortsubject; "RE:"));"");

@If(@Contains(shortsubject; "<.FW.>");
@Set("shortsubject"; @RightBack(shortsubject; "<.FW.>"));"");

@If(@Contains(shortsubject; "AG:");
@Set("shortsubject"; @RightBack(shortsubject; "AG:"));"");

@If(@Contains(shortsubject; "WG:");
@Set("shortsubject"; @RightBack(shortsubject; "WG:"));"");

@If(@Contains(shortsubject; "Fwd:");
@Set("shortsubject"; @RightBack(shortsubject; "Fwd:"));"");

@If(@Contains(shortsubject; "Fw:");
@Set("shortsubject"; @RightBack(shortsubject; "Fw:"));"");

@If(@Contains(shortsubject; "FW:");
@Set("shortsubject"; @RightBack(shortsubject; "FW:"));"");

@If(@Contains(shortsubject; "Wtr:");
@Set("shortsubject"; @RightBack(shortsubject; "Wtr:"));"");

REM {remove leading, trailing, and dup blanks:};
@Set("shortsubject"; @Trim(shortsubject));

@If(Form = "NonDelivery Report"; "DELIVERY FAILURE: " + FailureReason;
Form = "Delivery Report"; "DELIVERED: " + Subject; Form = "Return Receipt";
"RECEIVED: " + Subject; Form = "ReturnNonReceipt"; "NOT RECEIVED: " +
Subject; shortsubject)
----------------------


Issue with this code:

This view usually fails to return accurate results. Observation has shown that these errors are not ALWAYS occurring, but when they do, the observation is as follows:
1. When the subject starts with Re: it usually throws an error.
2. Where the email has gone back and forth many times and it starts with Re: <.FW.>, it fails to give results.
3. This code does not return ALL mails with the same subject. It shows a few less. I have not been able to figure any pattern there.

Can anyone help with this? Or come up with a completely different option which helps?

TIA,

-=KoolPal=-



Taken Actions by Owners

No actions have been taken yet.


In this field you can enter the actual request.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.