Function EN Version 1.90

@ScanVStack

Note Search System VStack

Syntax

@ScanVStack(NAME1);
@ScanVStack(NAME1;DATATYPES2);
@ScanVStack(NAME1;DATATYPES2;FIELDFLAGS3);

Description

Returns all variables on the VStack with the name TEXT NAME1 als TEXTLIST as a TEXTLIST. variables of the data types PV und UA are not taken into account. If only "" is specified for NAME1 , the variables from _PRCVSTACK are output.

IMPORTANT VStacks:

_PRGCTRLVSTACK
_DBPCTRLVSTACK
_INDEX
_GDEFFNVSTACK
_FDEFVSTACK
_SYSTEM
_PRGVSTACK1
_PRGVSTACK2
_TMPVSTACK
MAIN
SYSTEM
GLOBAL

NOTE:
All variables beginning with "_" (underscore) are SYSTEMVARIABLES which should not be used!
SYSTEMVARIABLES are neither supported nor documented.

!!!! VStacks are variables too !!!!

The optional parameter TEXT/TEXTLIST DATATYPES2 can be used to restrict the data types of the variables being searched for; for example, only all TEXT variables. If a NULLSTRING or a TEXTLIST mit NULL elements is specified, @ScanVStack behaves as if the parameter had not been specified; that is, all data types except PV und UA). For the data type abbreviations, see @GetDataType.

The optional parameter FN/FNLIST FIELDFLAGS3 can be used to restrict the field flags of the variables being searched for.
If only one element is specified (FN oder FNLIST with only one element), each variable being searched for must have at least these field flags set; all others are also permitted.
If a FNLIST with two elements is specified, each variable being searched for must have at least the field flags from the first element of FNLIST FIELDFLAGS3 set and may have all field flags from the second element of FNLIST FIELDFLAGS3 set.

Field-Flags:
1   SIGN
2   SEAL
4   SUMMARY
16   SEALED
32   READ/WRITE-ACCESS
64   NAMES
256   PLACEHOLDER
512   PROTECTED
1024   READ-ACCESS

Practical examples of combinations:
Names fielder   :   SUMMARY + NAMES
Readers fielder   :   SUMMARY + READ-ACCESS + NAMES
Authors fielder   :   SUMMARY + READ/WRITE-ACCESS + NAMES

Example: @ScanVStack(NAME1)

NAME1:="GLOBAL";
@ScanVStack(NAME1);

returns a list of all global variables

DBHANDLE:=@OpenDB("EWASTL\\TESTFA.NSF");
VIEWHANDLE:=@OpenView(DBHANDLE;"TEST VIEW");
VIEWPOSITION:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE:=@OpenNoteByposition(DBHANDLE;VIEWHANDLE;VIEWPOSITION;NOTEHANDLE);
@LogReport(@ScanVStack("NOTEHANDLE"));
NOTEHANDLE:=@CloseNote(NOTEHANDLE;0);
VIEWHANDLE:=@CloseView(VIEWHANDLE);
DBHANDLE:=@CloseDB(DBHANDLE);

A database is opened, all field names found are output, and finally the database is closed again. This shows the internal equal handling of VARGROUP und NOTEHANDLE .

Example: @ScanVStack(NAME1;DATATYPES2)

DBHANDLE:=@OpenDB("TESTDB\\TESTDB1.NSF");
NOTEID:=20638;
NOTEHANDLE:=@OpenNoteByID(DBHANDLE;NOTEID;NOTEHANDLE);

DATATYPES2:="A":"AL";
variableNames:=@ScanVStack("NOTEHANDLE";DATATYPES2);
@LogReport(variableNames;3);

NOTEHANDLE:=@CloseNote(NOTEHANDLE;0);
DBHANDLE:=@CloseDB(DBHANDLE);

Here, all TEXT bzw. TEXTLIST variables of a document are searched for and output using @LogReport output.

Example: @ScanVStack(NAME1;DATATYPES2;FIELDFLAGS3)

DBHANDLE:=@OpenDB("TESTDB\\TESTDB1.NSF");
NOTEID:=20638;
NOTEHANDLE:=@OpenNoteByID(DBHANDLE;NOTEID;NOTEHANDLE);

/*Search for and output all Names variables*/
DATATYPES2:="A":"AL";
FIELDFLAGS3:=68:0; /*4+64:0 must haben SUMMARY+NAMES und darf otherwise nichts (0) haben*/
variableNames:=@ScanVStack("NOTEHANDLE";DATATYPES2;FIELDFLAGS3);
@LogReport("Names:";3);
@LogReport(variableNames;3);

/*Search for and output all Reader Names variables*/
DATATYPES2:="A":"AL";
FIELDFLAGS3:=1092:0; /*4+64+1024:0 must haben SUMMARY+NAMES+READ-ACCESS und darf otherwise nichts (0) haben*/
variableNames:=@ScanVStack("NOTEHANDLE";DATATYPES2;FIELDFLAGS3);
@LogReport("Names:";3);
@LogReport(variableNames;3);

/*Search for and output all Author Names variables*/
DATATYPES2:="A":"AL";
FIELDFLAGS3:=100:0; /*4+64+32:0 must haben SUMMARY+NAMES+READ/WRITE-ACCESS und darf otherwise nichts (0) haben*/
variableNames:=@ScanVStack("NOTEHANDLE";DATATYPES2;FIELDFLAGS3);
@LogReport("Names:";3);
@LogReport(variableNames;3);

/*Search for and output all types of Names variables*/
DATATYPES2:="A":"AL";
FIELDFLAGS3:=64:1060; /*64:(4+1024+32) must haben NAMES und darf haben SUMMARY und/oder READ-ACCESS und/oder READ/WRITE-ACCESS*/
variableNames:=@ScanVStack("NOTEHANDLE";DATATYPES2;FIELDFLAGS3);
@LogReport("Names:";3);
@LogReport(variableNames;3);

NOTEHANDLE:=@CloseNote(NOTEHANDLE;0);
DBHANDLE:=@CloseDB(DBHANDLE);

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