Function EN Version 1.90

@ScanDB

Database IDList Note NotesSystem Search

Syntax

@ScanDB(DBHANDLE1;FORMULA2;SINCE3;NOTECLASSES4);
@ScanDB(DBHANDLE1;FORMULA2;SINCE3;NOTECLASSES4;MODUS5);

Description

Searches for all documents in the database with DBHANDLE DBHANDLE1 that match the selection formula TEXT FORMULA2 and were modified in this DB before the time TD SINCE3 and are contained in NOTECLASSES NOTECLASSES4 . If the documents should be selected regardless of their last modification, the @Function @AnyAllDay returns the appropriate time-date value; see @AnyDay/@AllDay/@AnyAllDay. An IDLIST containing the NoteIDs of the selected documents is returned.
(Till APIEngine < V2.10, the data type FLOATLIST was returned; see LIMITS. As of V2.10, the data type IDList is returned.
Because not all @Functions that can be applied to the data type IDList can also be applied to the data type FLOATLIST a pre-V2.10 version can be simulated for compatibility by using the NOTES.INI Eintrag APIVersionModus NOTES.INI entry.)

It is also possible to scan the Domino Directory with this @Function (to do so, create a pseudo DBHANDLE via @OpenDB using an empty string "").
In this case, FN NOTECLASSES4 controls which files are to be found.
The return value is always a HUGETEXTLIST in this case. FORMULA2 is ignored, but should nevertheless be specified as "SELECT @All".

NOTECLASSES4:
DEC   BIT   Meaning
00000   XX   No Notes   No documents
00001   01   Documents   Data documents
00002   02   Policy Note   Database policy document
00004   03   Form Note   Form design documents
00008   04   View Note   View design documents
00016   05   Icon Note   Icon document
00032   06   Design Collection Note   View documents
00064   07   ACL Info Note   ACL info document
00128   08   Help Index Note   
00256   09   Help Note   Help database document
00512   10   Filter Note   Macro design documents
01024   11   Field Note   Field design documents
02048   12   Replication Note   Replication documents
04096   13   Private Design   Private design documents

32768   16   Default Note of Each   Default document of each type

32767   01-15   Notes   All documents
32766   02-15   All Non-Document Notes   All non-data documents
To specify several document classes, add the values of the corresponding classes or build them using @BitVektor.

NOTECLASSES4 (for a directory scan):
Types:
DEC   Meaning
00000   FILE_ANY      all file types
00001   FILE_DBREPL      all databases that could be replicated
00002   FILE_DBDESIGN   all databases that could be templates
00003   FILE_DBDESIGN   all mail-box databases (MAIL.BOX, SMTP.BOX, …)
00004   FILE_DBANY      all databases (NS?)
00005   FILE_FTANY      all NTF databases (NT?)
00006   FILE_MDMTYPE   modem command files (MDM)
00007   FILE_DIRSONLY   directories only
00008   FILE_VPCTYPE   virtual-port command files (VPC)
00009   FILE_SCRTYPE   COMM-port script files (SCR)
00010   FILE_ANYNOTEFILE   absolutely all Notes databases (NS?, NT?, BOX)
00011   FILE_UNIQUETEMP   container and sort temporary files (DTF)
00012   FILE_MULTICLN   multi-user cleanup files (CLN)
00013   FILE_SMARTI      all SMARTICON files (SMI)
00014   FILE_DBREP_REDIR   FILE_DBREPL and database redirects

Flags:
HEX   DEC   BIT   Meaning
0100   00256   09 FILE_SKIPDAOS   do not traverse the DAOS repository
0200   00512   10 FILE_SKIPJS   do not traverse HTTP’s JavaScript directories
1000   04096   13 FILE_LINKSONLY   return all directories, linked files, and linked directories
2000   08192   14 FILE_RECURSE   recursively search subdirectories
4000   16384   15 FILE_NOUPDIRS   do not return parent-directory entries (..)
8000   32768   16 FILE_DIRS   return subdirectories as well as regular files
Only one type can be specified, but multiple flags may be used. To combine flags, simply add their values together.

MODUS5:
0= Wie ohne Angabe
1= The data type IDList is returned in all cases, regardless of the APIVersionModus(NOTES.INI) setting.
2= A UNIDList is returned (as of V3.00).

LIMITS:
For FLOATLIST as return value, a maximum of 8063 elements -> data type FLOATLIST.

Example: @ScanDB(DBHANDLE1;FORMULA2;SINCE3;NOTECLASSES4)

DBHANDLE1:=@OpenDB("TEST.NSF");
FORMULA2:="SELECT Form=\"TEST FORM\" & Category=\"Kat1\"";
@LogReport(@ScanDB(DBHANDLE1;FORMULA2;@AnyAllDay;32767));
DBHANDLE1:=@CloseDB(DBHANDLE1);

A database is opened, all documents are selected regardless of their creation date whose Form field contains "TEST FORM" and whose Category field contains "Kat1"; their NoteIDs are output and finally the database is closed again.

Note : This text was machine-translated and may contain inaccuracies.