Advertisement

10.13.2008 at 02:01PM PDT, ID: 23810866
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Document revision history in a Notes R5 field

Asked by yim11 in Lotus Notes, Lotus Domino Email Server

Tags: , ,

Hello,

I am trying to add a doc revision history at the bottom of a Notes form/doc. I just need date/time and user name of last 3 edits. I _really_ need to keep this as simple as possible. I've tried a few code snippets online but nothing has worked so far. Last code attempt is posted. Thanks in advance for any assistance.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
This formula allows you to keep a revision history in a single computed field. Unlike most such revision trackers, it does not rely on the QuerySave event. The formula tests if the current user's name is in the most recent entry in the field. If so, only the date is updated so you don't get multiple entries for the same person if there is no intervening editor. The results display like this:
 
Joe Smith 10/29/2001 12:40:08 PM
George Bush 10/29/2001 12:40:46 PM
Rob Pinion 10/29/2001 12:50:15 PM
George Bush 10/29/2001 12:50:41 PM
 
 
Code
 
 
thisUser:=@Name([CN];@UserName);
 
REM "To use this function change the field name below from displayUpdater to your field name";
REM "The field should be Text, computed, allow multiple values, display separate entries with New Line"; 
thisfield:=displayUpdater;
 
REM "Assign all current lines in this field to a temporary variable";
existingLines:=thisfield;
 
REM "Each new line will have the user's name and the current date-time";
newLine:=thisUser+" "+@Text(@Now);
 
REM "Now compare to see if the current user is the most recent editor";
REM "Get the last entry since it contains the most recent editor";
 
REM "First get a count of the number of lines --- elements --- already there";
numLines:=@Elements(existingLines);
 
REM "If there's only one line assign it to lastEntry var, otherwise assign the last entry to lastEntry var";
lastEntry:=@If(numLines=1;existingLines;@Subset(existingLines;-1));
 
REM "Test whether the last line contains the name of the current user";
REM "Later we want to replace that line rather than adding a new line every time he saves the doc";
isSameUser:=@Contains(lastEntry;thisUser);
 
REM "Now get all lines but the last line";
allButLast:=@If(numLines=1;"";@Subset(existingLines;numLines-1));
 
REM "If the doc is being saved, then if this is same user return all but the last line followed by the new line";
 
REM "If this is not the same user, return everything preexisting plus a new line";
 
REM "If the doc is not being saved just show the contents of the field";
 
@If(@IsDocBeingSaved;@If(isSameUser;allButLast:newLine;thisfield:newLine);thisfield)
 
Loading Advertisement...
 
[+][-]10.13.2008 at 07:45PM PDT, ID: 22708261

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.14.2008 at 07:53AM PDT, ID: 22711851

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.14.2008 at 11:45AM PDT, ID: 22714545

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.14.2008 at 02:07PM PDT, ID: 22715999

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.12.2008 at 01:47AM PST, ID: 22937986

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Lotus Notes, Lotus Domino Email Server
Tags: IBM, Lotus Notes, R5
Sign Up Now!
Solution Provided By: rd153
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628