Gestion des logs

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

Gestion des logs

Messagepar VastoMarine » 06 Mars 2012 à 17:19

Bonjour,
Je souhaiterai exclure les données du sous-masque lors de la fonction ci-dessous.
La fonction compare les données du masque dans son état avant et après la sauvegarde.
Merci




Function GetDocumentDifference() As String

Dim cDifference As String
Dim oForm As NotesForm
Dim ItemOrig As NotesItem
Dim ItemNew As NotesItem
Dim nIndex As Integer
Dim cont As Integer
Dim contTotal As Integer
Dim contModif As Integer

On Error GoTo Errmgt

GetDocumentDifference = ""
Set oForm = g_db.GetForm( g_Doc.Form(0) )

cont=0
contTotal=0
contModif=0

Forall xFieldname In oForm.Fields

If Cstr(xFieldname)="HTTP_User_Agent" Then
cont = 1
End If

End ForAll

If cont=0 Then

Forall xFieldname In oForm.Fields

contTotal=contTotal+1

If ( ProcessField( g_Doc.Form(0) , Cstr( xFieldname ) ) ) Then
'// Field To compare

Set ItemOrig = g_PreEditDoc.GetFirstItem( xFieldname )
Set ItemNew = g_Doc.GetFirstItem( xFieldname )

If ItemNew.Name <> "Attach" Then

Select Case ItemOrig.Type

Case 1

'// TO DO

Case 1084 , 1090

'//TO DO

Case Else
'//-- Check Length ---
If Ubound( ItemOrig.Values ) <> Ubound( ItemNew.Values ) Then
'// Multiple Values to compare
'// TO DO
Else


If CStr(ItemOrig.Values(0)) <> CStr(ItemNew.Values(0)) Then

' ------------------------------

cDifference = cDifference & {Le champ [} & xFieldname & {] a été modifié de "} & CStr(ItemOrig.Values(0)) & {" à "} & CStr(ItemNew.Values(0)) & {"}

' ------------------------------------
'* cDifference = cDifference

contModif = contModif + 1

End If
End If
End Select

End If

End If
End Forall

End If


GetDocumentDifference = cDifference

print "Valeur de cDifference : " & GetDocumentDifference & " " & CStr(contModif)& "/" & CStr(contTotal)

Exit Function

Errmgt :
print "Error (" & ItemNew.Name & " - " & ItemOrig.Type & ") " & Str(Err) & ": " & Error$
Resume next

End Function

------------------------------------------------------------------------

'// Here copy all Field in the Temp Backend Document
Set g_PreEditDoc = New NotesDocument( g_db )
Call g_Doc.CopyAllItems( g_PreEditDoc , True )
Avatar de l’utilisateur
VastoMarine
Posteur habitué
Posteur habitué
 
Message(s) : 202
Inscrit(e) le : 10 Août 2005 à 08:40

Retour vers Développement

cron