4D v16.3CREATE SELECTION FROM ARRAY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
CREATE SELECTION FROM ARRAY
CREATE SELECTION FROM ARRAY
The CREATE SELECTION FROM ARRAY command creates the named selection selectionName from:
If you don’t pass selectionName or if you pass an empty string, the command will be applied to the current selection, which will then be updated. When you use a Longint array with this command, all the numbers of the array represent the list of record numbers in selectionName. If a number is incorrect (record not created), error -10503 is generated. Note: Be careful, you must make sure that the array does not contain any lines that have the same value, otherwise the resulting selection will be incorrect. When you use a Boolean array with this command, the Xth element of the array indicates if the record number X is (True) or is not (False) in selectionName. The number of elements in recordArray must be equal to the number of records in table. If the array is smaller than the number of records, only the records defined by the array can make up the selection. Note: With an array of booleans, the command uses elements from numbers 0 to X-1. Warning: A named selection is created and loaded into memory. Therefore, make sure that you have enough memory before executing this command. If a record number is invalid (record not created), the error -10503 is generated. You can intercept this error using a method installed by the ON ERR CALL command.
See also
CLEAR NAMED SELECTION
|
PROPERTIES
Product: 4D HISTORY
Modified: 4D v6.7 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||