Count list items

4D - Documentation   Français   English   German   4th Dimension 2003, Command Theme List   4th Dimension 2003, Command Alphabetical List   4th Dimension 2003, Constant Theme List   Back   Previous   Next

version 6.0


Count list items (list) Long

ParameterTypeDescription
listListRefList reference number
Function resultLongNumber 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.


4D - Documentation   Français   English   German   4th Dimension 2003, Command Theme List   4th Dimension 2003, Command Alphabetical List   4th Dimension 2003, Constant Theme List   Back   Previous   Next