Search code examples
lotus-noteslotus-dominolotusscriptlotus

Why is {Truncated} displayed in the Window Title of a document?


Once in a while we get a document that can not be edited. When it happens, {Truncated} is displayed in the Window Title of the document. What causes this? I created an agent to create a new document and make it the parent of any child documents. This is the only way we can edit the data. Any thoughts would be appreciated.

UPDATED 6/15/17: Below is the code for adding a comment. This code is used multiple times in the application. I seems to happen the first time the code is executed. The code is in a script library called by a shared action.

Sub Reviewer_DR_Create_Comment
    On Error GoTo processError
    Dim session As New NotesSession , db As NotesDatabase , doc As NotesDocument
    Dim workspace As New NotesUIWorkspace , uidoc As NotesUIDocument

        Set db = session.CurrentDatabase
    Set doc = db.CreateDocument
    Set uidoc = workspace.CurrentDocument

    Call doc.MakeResponse( uidoc.document )

    doc.ProcedureWriter = uidoc.document.ProcedureWriter
    doc.ManualNumber = uidoc.document.ManualNumber
    doc.ProcedureNumber = uidoc.document.ProcedureNumber
    doc.ProjectedRevNumber = uidoc.document.ProjectedRevNumber
    doc.DraftLetter = uidoc.document.DraftLetter
    doc.Facility = uidoc.document.Facility
    doc.PCRNumber= uidoc.document.PCRNumber
    If Right(uidoc.document.action(0),11) = "Concurrence"  Then  doc.Concurrence="Yes" 
    If uidoc.EditMode Then Call uidoc.Document.Save(True, False)
    Call uidoc.close(True)
    Call Refresh_PR_Views
    doc.form = "(Comments - Draft Procedure)"
    Set uidoc = workspace.EditDocument( True , doc)

    Exit Sub
    processError:
    MessageBox LogError()       ' Put up message and send to error database
    Exit Sub    
End Sub

Calls Refresh_PR_Views: Sub Refresh_PR_Views On Error GoTo ErrorHandler

    Dim s As New NotesSession
    Dim db As NotesDatabase
    Dim ws As New NotesUIWorkspace
    Dim uid As NotesUIDocument
    Dim doc As NotesDocument
    Dim errmsg As String
    Dim v As NotesView
    Dim v1 As NotesView
    Dim v2 As NotesView
    Dim v3 As NotesView
    Dim v4 As NotesView
    Dim v5 As NotesView
    Dim v6 As NotesView

    Set db=s.CurrentDatabase
    Set v=db.Getview("Procedure Review - Doc Number")
    Set v1=db.Getview("Procedure Review - Driver/Sub-Driver")
    Set v2=db.Getview("Procedure Review")
    Set v3=db.Getview("Procedure Review - By Priority")
    Set v4=db.Getview("Procedure Review - Status")
    Set v5=db.Getview("Procedure Review - By Title")
    Set v6=db.Getview("Procedure Review - Sub Driver/Driver")

    Call v.Refresh()
    Call v1.Refresh()
    Call v2.Refresh()
    Call v3.Refresh()
    Call v4.Refresh()
    Call v5.Refresh()
    Call v6.Refresh()
    Call ws.Viewrefresh()

NormalExit:
    Exit Sub
ErrorHandler:
errmsg="APS Utilities SCRIPT LIBRARY: Refresh_PR_Views ROUTINE: Got error # " & CStr(Err) & " - "  & Error$ & " on line " & CStr(Erl)
    If s.IsOnServer Then
            Print errmsg
    Else
        MessageBox errmsg
    End If
    Resume NormalExit
End Sub

Once the comment form is filled out, they click the Save & Exit Button. That code is here:

Sub Click(Source As Button)
    'Print "Starting"
Dim Session As New NotesSession 
Dim db As NotesDatabase 
Dim doc As NotesDocument 
Dim NewDoc As NotesDocument
Dim ws As New NotesUIWorkspace
Dim Parent As NotesDocument
Dim xuidoc As Variant

    Set db = session.CurrentDatabase
    Set uidoc = ws.CurrentDocument
    Set doc = uidoc.document
    Set parent = db.GetDocumentByUNID ( Doc.ParentDocumentUNID )
    Set xuidoc = ws.CurrentDocument

If uidoc.EditMode Then Call uidoc.save
Call uidoc.Close
'Refresh Parent
Call ws.EditDocument( True , Parent , , ,  ,False)
Call ws.ReloadWindow
Call xuidoc.RefreshHideFormulas

End Sub


Solution

  • I found the cause of my issue. The Save & Exit button code was out of sequence. I copied code from one of the other Save & Exit buttons of another Comment form and the error went away. Appreciate the suggestions and the help.

    MJ