version 6.0
Count list items (list) Long
| Parameter | Type | Description | |
| list | ListRef | List reference number | |
| Function result | Long | Number of items in expanded lists |
Description
The command Count list items returns the number of items currently "visible" in the list whose reference number you pass in list.
Count list items does not return the total number of items in the list. It 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.
Examples
Here a list named hList shown in the User environment:
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 2
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 5
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 7
$vlNbItems:=Count list items(hList) ` at this point $vlNbItems gets 4
See Also
List item position, Selected list item.