I want to know the count of total no. of lines of text appended into rich text field i.e history field.
There is a rich text field to track the history of editing the document.
Every time the document is modified i.e. changing any of the fields the information is appended into the rich text field.
But it is not tracked that how many items are appended i.e how many times editing had been done in old documents. So, there is a requirement to know in how many documents the no. of editing is more that 100. How this can be done.
Software/Hardware used:
Lotus notes, lotus script, no. of lines appended in rich text field
ASKED:
April 12, 2012 8:46 AM
UPDATED:
April 26, 2012 7:41 PM
Hi there ,,
The only thing I can mention over here is Lotus Limits
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.notes85.help.doc%2Ffram_limits_of_notes_r.html
Best Wishes
I have created a memo with this agent:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtItem As NotesRichTextItem
Dim i%
Set doc = s.CurrentDatabase.CreateDocument
doc.Subject = “100 Lines in Body”
doc.SendTo = s.UserName
Doc.Form = “Memo”
Set rtItem = doc.CreateRichTextItem(“Body”)
For i = 0 To 99
Call rtItem.AddNewline(1, True)
Call rtItem.AppendText(Str(i) + ” line in Body is here yxdvyxcvyxcv yxcv yxcv yxcv yx cvyx cv”)
Next
Call doc.Save(True, False)
Call doc.Send(False)
End Sub
Then I could count the number of lines in the body field of this memo with the following agent:
Sub Initialize
Dim s As New NotesSession
Dim doc As NotesDocument
Dim rtItem As NotesRichTextItem
Dim item As Variant
Dim plainText$, vTmp
Set doc = s.CurrentDatabase.UnprocessedDocuments.GetFirstDocument
If Not doc Is Nothing Then
If doc.HasItem(“Body”) Then
Set item = doc.GetFirstItem(“Body”)
If item.Type = 1 Then
Set rtItem = doc.GetFirstItem(“Body”)
plainText = rtItem.GetUnformattedText( )
vTmp = Split(plainText, Chr$(10))
Msgbox Str(Ubound(vTmp)) + ” strings were found in Body”
End If
End If
End If
End Sub
Best regards