4D v13.4Count list items |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
Count list items
Count list items
The Count list items command returns either the number of items currently “visible” or the total number of items in the list whose reference number or object name you pass 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 or work with all the items (the second * is passed), you can use either syntax. Conversely, if you use several representations of the same list and work with the visible items (the second * is omitted), 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 Count list items command will only apply to the first object whose name corresponds. Use the second * parameter to determine which type of information will be returned. When this parameter is passed, the command returns the total number of items present in the list, regardless of whether it is expanded or collapsed. When this parameter is omitted, the command returns the number of items that are visible, depending on the current expanded/collapsed state of the list and its sublists. You apply this command to a list displayed in a form. Here a list named hList shown in the Application environment:
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 8
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 2
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 5
|
PROPERTIES
Product: 4D
INDEX HISTORY
Modified: 4D v11 SQL SEE ALSO
List item position |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||