PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Limitations
  • Browsing List Box control
  • Last element
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the number of elements found in a List Box (or ListView) control or in a Combo Box control.
Note: <List Box>.Count can be used on:
  • the browsing or memory List Box controls,
  • single-selection or multiselection Looper controls.
Example
// Number of elements found in the "LIST_CustomerList" control
ResNumberElements = LIST_CustomerList.Count()
Syntax
<Result> = <List Box control>.Count()
<Result>: Integer
Number of elements (rows) found in the specified control.
<List Box control>: Control name
Name of List Box or Combo Box control to use.
Remarks

Limitations

If the specified List Box (or Combo Box) control is linked to a file that contains more than 2,147,483,647 records, the returned value is truncated to this value.
Reports and Queries

Browsing List Box control

For a browsing List Box control, <List Box>.Count returns:
  • the total number of records found in the linked file if no filter was defined.
  • the number of records matching the filter if a filter was defined.
  • the number of records found in the query linked to the control.
The end of initialization code of control is run once the total is calculated.

Caution: The time for calculating the number of records can be quite long

Last element

To position on the last element of List Box control, use the following syntax:
<List Box control>.SelectPlus(<List Box control>..Count)
or
<List Box control> = <List Box control>..Count
or
<List Box control> = <List Box control>.Count()

Miscellaneous

  • To find out the number of rows in a Table control, use <Table>.Count.
  • <List Box>.Count can be used on a "Combo Box" table column.
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment