- @FORMULAS
********************************************************************
profilename := "Page Usage Count";
docid := @Text(@DocumentUniqueID);
timestamp := @Now;
count := @GetProfileField(profilename; "Count"+docid);
@If(count="";
@Do(@Set("count";1); @SetProfileField(profilename; "TimeStamp"+docid; timestamp));
@Do(@Set("timestamp";@GetProfileField(profilename; "TimeStamp"+docid));@Set("count"; count+1)));
@SetProfileField(profilename; "Count"+docid; count);"A questa pagina hanno avuto accesso " + @Text(count) + " Fino Alle " + @Text(timestamp; "D0T1S2")
********************************************************************
- Agente Lotus-script
********************************************************************
Sub Initialize
Dim Session As New NotesSession
Dim ProfileDoc As NotesDocument
Dim doc As NotesDocument
Dim num As Double
Dim NumStr As String
Set db = Session.CurrentDatabase
'The following line gets a handle to the current
document
Set doc = Session.DocumentContext
'The following line creates a Profile document
called 'Domino' the first time 'it is executed and from then on modifies
the existing 'Domino' document
Set ProfileDoc = db.GetProfileDocument("Domino")
NumStr = ProfileDoc.num(0)
If NumStr = "" Then
num = 1
Else
num = Cdbl(NumStr) + 1
End If
ProfileDoc.num = Cstr(num)
Call profiledoc.save(False,False)
doc.Number = num
End Sub
********************************************************************
Questo agente verrà settato con l'opzione
"Run at once" e salvato ad esempio come "counter"
Sulla Form dove si vuole rendere attivo
il contatore creare un campo numerico chiamato "Number" ed aggiungere
un campo "computed text" chiamato $$QueryOpenAgent.
Come formula di questo campo mettere il nome dell'agente da richiamare
( nel ns. esempio "counter")
0 Commenti:
Nessun Commento Trovato