Puoi, tramite l\'evento Inviewedit della vista modificare i valori visualizzati nelle colonne. Questo è un esempio di script: Const QUERY_REQUEST = 1 \' used when the user enters the editable column Const VALIDATE_REQUEST = 2 \' used when the user exits the editable column Const SAVE_REQUEST = 3 \' saves after validation for an existing view entry Const NEWENTRY_REQUEST = 4 \' after validation when the user makes a new entry in a view Dim NomeCampo As String Dim ws As New NotesUIWorkspace Dim note As NotesDocument Dim db As NotesDatabase Set db = ws.CurrentDatabase.Database If (Source.CaretNoteID = "0") Then Exit Sub Set note = db.GetDocumentByID(Source.CaretNoteID) \' The Notes ID of the document currently highlighted (that is, at the caret location) in a view Select Case Colprogname(0) Case "fax" : NomeCampo= "Fax" \' field name Case "Telefono1" : NomeCampo= "Telefono1" \' field name Case "Telefono2": NomeCampo= "Telefono2" \' field name End Select If (note Is Nothing) Then Exit Sub If (RequestType = QUERY_REQUEST) Then If(note.HasItem(NomeCampo)) Then Columnvalue(0) = note.GetItemValue(Colprogname(0)) \'Get the current (original) value to put in Edit box Else Continue = False \'This doc does not contain the required field; ignore it End If Elseif (RequestType = VALIDATE_REQUEST) Then Continue = True \'Accept any user input Elseif (RequestType = SAVE_REQUEST) Then Call note.ReplaceItemValue (NomeCampo, ColumnValue(0)) \'assumes that value stored in ColumnValue(0) is the value that goes with that column. Call note.Save(True, True, True) End If Ciao Marco
|