4D v14.3SELECT LIST ITEMS BY POSITION |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
SELECT LIST ITEMS BY POSITION
SELECT LIST ITEMS BY POSITION
The SELECT LIST ITEMS BY POSITION command selects the item(s) whose position is passed in itemPos and, optionally, in positionsArray within the list whose reference number or object name is passed in list. If you pass the first optional * parameter, you indicate that the list parameter is an object name (string) corresponding to a representation of the list in the form. If you do not pass this parameter, you indicate that the list parameter is a hierarchical list reference (ListRef). If you only use a single representation of the list, you can use either syntax. Conversely, if you use several representations of the same list, the syntax based on the object name is required since each representation can have its own expanded/collapsed configuration. Note: If you use the @ character in the name of the list object and the form contains several lists that match with this name, the SELECT LIST ITEMS BY POSITION command will only apply to the first object whose name corresponds. The position of items is always expressed using the current expanded/collapsed state of the list and its sublists. You pass a position value between 1 and the value returned by Count list items. If you pass a value outside this range, no item is selected. If you do not pass the positionsArray parameter, the itemPos parameter represents the position of the item to be selected. The optional positionsArray parameter lets you select several items simultaneously within the list. In positionsArray, you must pass an array where each line indicates the position of an item to be selected. When you pass this parameter, the item designated by the itemPos parameter sets the new current item of the list among the resulting selection. It may or may not belong to the set of items defined by the array. The current item is, more particularly, the one that is edited if the EDIT ITEM command is used. Note: In order for several items to be selected simultaneously in a hierarchical list (manually or by programming), the multiSelections property must have been enabled for this list. This property is set using the SET LIST PROPERTIES command. Given the hierarchical list named hList, shown here in the Application environment: After the execution of this code:
SELECT LIST ITEMS BY POSITION(hList;Count list items(hList)) The last visible list item is selected: After execution of the following lines of code: SET LIST PROPERTIES(hList;0;0;18;0;1) ... the 2nd, 3rd and 5th items of the hierarchical list are selected: |
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v11 SQL SEE ALSO
EDIT ITEM ARTICLE USAGE
4D Language Reference ( 4D v12.4) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||