Function EN Version 3.08

@ReplicateWithFormula

Database NotesAdmin NotesSystem Replication

Syntax

@ReplicateWithFormula(DBHANDLE1;DBHANDLE2;FORMULA3;FNLIST4);
@ReplicateWithFormula(DBHANDLE1;DBHANDLE2;FORMULA3;FNLIST4;NOTECLASSES5;FNREPLICATIONFLAGS6);
@ReplicateWithFormula(DBHANDLE1;DBHANDLE2;FORMULA3;FNLIST4;NOTECLASSES5;FNREPLICATIONFLAGS6;FNLISTERROR7);

Description

Replicates the database with DBHANDLE DBHANDLE1 with the database with DBHANDLE DBHANDLE2, replicating only the documents thas match the Notes-compatible selection formula TEXT/TEXTLIST FORMULA3. If FORMULA3 a TEXTLIST is passed, the first element is used as the selection formula for the DB with DBHANDLE1 and the second element is used accordingly for the DB with DBHANDLE2. FNLIST FNLIST4 is a list of rights where the first element specifies the replication rights in the first database and the second element specifies the rights in the second database. The databases do not have to be replicas of each other. FN FNREPLICATIONFLAGS6 can be used to enable or disable options in the replicator.

A FNLIST is returned:

element   Meaning
1   UpdateCount DBHANDLE1
2   CreateCount DBHANDLE1
3   DeleteCount DBHANDLE1
4   UpdateCount DBHANDLE2
5   CreateCount DBHANDLE2
6   DeleteCount DBHANDLE2

FNLIST4:

Bit   HEX   Meaning
01   0001   Read
02   0002   Write
03   0004   Modify
04   0008   Delete

The optional parameter NOTECLASSES NOTECLASSES5 is used to restrict the documents considered in the selection formula TEXT FORMULA3. If parameter 5 is not specified, the selection formula TEXT FORMULA3 is applied to documents of NOTECLASS 1 (Documents).

NOTECLASSES5:
DEC   BIT   Meaning

00000   XX   No Notes   no documents
00001   01   Documents   data documents
00002   02   Policy-Note   About database 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   Privat_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 multiple document classes, add the values of the relevant classes or build them using @BitVektor.)

FNREPLICATIONFLAGS6:
Bit   HEX   Meaning
01   0001   Localize links (Doc;View;DB) in databases with different replica IDs.
02   0002   Reserved
03   0004   "NOTE changed during the REPLICATION process, …" error messages are not output.

FNLISTERROR7:
When the optional return parameter FNLISTERROR7 is used, error statisics are returned in it.

element   Meaning
1   Error UpdateCount DBHANDLE1
2   Error CreateCount DBHANDLE1
3   Error DeleteCount DBHANDLE1
4   Error UpdateCount DBHANDLE2
5   Error CreateCount DBHANDLE2
6   Error DeleteCount DBHANDLE2

Example: @ReplicateWithFormula(DBHANDLE1;DBHANDLE2;FORMULA3;FNLIST4)

DBHANDLE1:=@OpenDB("TESTRP1.NSF");
DBHANDLE2:=@OpenDB("TESTRP2.NSF");
FORMULA3:="SELECT Form=\"TEST FORM\"";
FNLIST4:=@BitVektor(1:2:3:4);
FNLIST4:=FNLIST4:FNLIST4;
@LogReport(@ReplicateWithFormula(DBHANDLE1;DBHANDLE2;FORMULA3;FNLIST4));
DBHANDLE2:=@CloseDB(DBHANDLE2);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The database "TESTRP1.NSF" with the database "TESTRP2.NSF" is replicated and the result is output. Only documents matching the selection formula are replicated.

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