4D v14.3LIST TO ARRAY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
LIST TO ARRAY
LIST TO ARRAY
The LIST TO ARRAY command creates or overrides the array array with the first level items of the list or choice list designated by list. In the list parameter, you can pass either the name of a choice list (string), or a reference to a hierarchical list (ListRef). If you do not set the array as an Alpha or Text type beforehand, LIST TO ARRAY creates a new Text array by default. The optional itemRefs parameter (a numeric array) returns the list item reference numbers. You can use LIST TO ARRAY to build an array based on the first level items of a list. However, this command does not allow you to work with any of the list's child items. When working with hierarchical lists, we recommend that you use the hierarchical lists commands, in particular Load list. The following example copies the items of a list called Regions into an array called atRegions: LIST TO ARRAY("Regions";atRegions) Given a hierarchical list created as follows: myList2:=New list This list can be represented as: If you execute the following statement: LIST TO ARRAY(myList1;$MyArray) ...you get $MyArray{1}="France" |
PROPERTIES
Product: 4D
HISTORY
SEE ALSO
ARRAY TO LIST ARTICLE USAGE
4D Language Reference ( 4D v14 R2) Inherited from : LIST TO ARRAY ( 4D v11 SQL Release 6) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||