Domino 9 und frühere Versionen > Entwicklung

Dokumente in Ansicht zählen und in ein Maskenfeld übernehmen

(1/2) > >>

HRaq:
Hallo Leute,

ich möchte in einer bestimmten Ansicht per Lotus Script die Anzahl der Dokumente zählen und das Ergebnis in ein Feld einer Maske übertragen.
Ich bin seit Tagen am suchen....keine Lösung. Könnt Ihr mir bitte helfen?

Danke Henning

ata:
... wie hast du gesucht?

Spaß beiseite - hier mit einer Schleife alle Docs zählen:

Dim ws As New NotesUIWorkspace
Dim docThis As NotesDocument
Dim dbThis As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim counter As Long

Set docThis = ws.CurrentDocument.Document
Set dbThis = docThis.ParentDatabase
Set view = dbThis.GetView( "DerAnsichtsName" )
counter = 0

If not view Is Nothing Then
   Set doc = View.GetFirstDocument
   While Not doc Is Nothing
       counter = counter + 1
       Set doc = view.GetNextDocument(doc)
   Wend
End If
docThis.Dein_FeldName_Zur_Aufnahme_Der_Nummer = counter

... sollte ins aktuell geöffnete Dokument die Anzahl der Doc's aus der Ansicht in ein Feld schreiben...


ata

HRaq:
Hallo Ata,

danke für den Tipp, das Script werd ich einbauen und mal schauen, was passiert...

Wie ich gesucht Habe? Designer Hilfe, Programming Guide, AT-Notes (Entwicklung).....


Gruß Henning

HRaq:
Hallo Ata,

vielen Dank, es klappt.......


Gruß Henning

eknori:
geht zur Not auch mit einer Formel

@Prompt([OK];"Number of Elements";@Text(@Elements(@DbColumn( "" : "NoCache" ; "ServerName" : "Datenbnk.nsf" ; "Ansicht" ; 1 ))))

 ;D

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln