Hi All,
I have a shared view(MyView) which will display only the Current User's Documents...
View Selection is :
SELECT Form = "FrmMemo" & Status1 = "Draft" & @Contains(@Author;@Word(@V3UserName;"/";1))
In the Form, i have Readers field with the value of Null("").
My form is designed like below :
To, CC, BCC, Subject and Body(RichText) fields will be there in the form...
1st, user will clicks on the button and selects an Excel file. I am importing the Excel file in a hidden view using the same form. And from there i am getting To, CC, BCC field values which will be displayed in currently opened form. Now, User will enter the Subject and Body fields and Saves the form...
When the form is saving, i am calling the document from imported Excel file view and appending the Subject and Body field values from the UI doc to that doc and saving it in this view(MyView) which will displays to the user... Now when the user opens this view(MyView), Only his documents will be shown in the view. Upto this everthing is working fine....
Now, the user opens a document from the view to edit it. After he edit the document and saves the document by clicking on Save & Close button... I am writing down a code here to capture the changes and saves the changes to the document in the view(MyView).
When the document is opened for editing, @Command([FileSave]) is not working and not making the changes reflecting in the view(MyView).. So i am writing down a code to inherit the changes...
The changes are reflecting now.... But when i refresh the view(MyView), the modified document is disappearing.... Not at all seeing in any user interface views.... But showing in hidden views....
Save & Close Button Code is :
Sub Click(Source As Button)
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim unid As String
Dim view As NotesView
Dim docA As NotesDocument
Dim rtitemA As NotesRichTextItem
Dim rtitemB As NotesRichTextItem
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
If uidoc.FieldGetText("Subject") = "" Then
Messagebox "Please key in the Subject", 0+32, "Subject"
uidoc.GotoField("Subject")
Exit Sub
End If
Set docA = uidoc.Document
Call uidoc.Save
unid = docA.UniversalID
Set doc = db.GetDocumentByUNID(unid)
If Not doc Is Nothing Then
Call doc.ReplaceItemValue("Subject", uidoc.FieldGetText("Subject"))
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitem = New NotesRichTextItem( doc, "temp" )
Call rtitem.AppendRTItem( rtitemA )
Set rtitemB = doc.GetFirstItem("Body")
rtitemB.Remove
Dim rtitemC As NotesRichTextItem
Set rtitemC = doc.CreateRichTextItem("Body")
Call rtitemC.AppendRTItem(rtitem)
rtitem.Remove
Call doc.Save(True, False, True)
End If
Call uidoc.Close
'Call ws.ViewRefresh
End Sub
Is there any problem with the Readers field are view selection.... I don't think the probs will come from view selection as its working fine upto showing Current Users documents.... I think there might some probs with Readers field.....
Pls gimme some suggestions to rectify this problem.....
Thanks
Suresh

Documents and Readers fields (Suresh VV Kumar... 12.Oct.05)
. . 