ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Various properties
  • Table control based on a data file with bouncing scrollbar
  • Array and associative array
  • Limit
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 24, Occurrence is kept for backward compatibility. This property has been replaced with Count.
The Count property returns the number of elements in a given set. You can get:
  • the number of rows in a List Box or Combo Box control.
  • the number of rows in a Table control. If there is a filter on a column, the Count property returns the number of elements displayed.
  • the number of rows in a Looper control.
  • the number of elements in a ListView control.
  • the number of rows in a Table control column.
  • the number of options in a Radio Button or Check Box control.
  • the number of controls in a group of controls.
  • the number of elements in a TreeView control.
  • the number of series in a Chart control.
  • the number of elements in an array, associative array or advanced array (arrays used in the gglxxx variables for example) as well as the number of occurrences for an element of the associative array.
  • the number of elements in a WLanguage queue, list or stack.
  • the number of indexed subelements in a variant.
  • the number of panes in a Tab control.
  • WEBDEV - Server codeWEBDEV - Browser code the number of files in an Upload control.
  • WINDEVWINDEV Mobile the number of options in a menu.
  • WINDEV the number of elements in an Organization Chart control.
WEBDEV - Browser code The Count property returns:
  • the number of rows in a List Box, Table, TreeView Table, Looper, Linear Looper, Tab or Combo Box control.
  • the number of elements in an array or associative array as well as the number of occurrences for an element of the associative array.
  • New in version 2025
    the number of elements in a WLanguage queue or stack.
Remark: The Occurrence property can be used interchangeably on a Table, List, RepeatString or File Combo field and on a Table, List, RepeatString or File Combo field by programming.
Example
// Number of elements found in the "TABLE_CustomerTable" control
ResCount = TABLE_CustomerTable.Count
// Number of elements in CustomerArray
CustomerArray is dynamic array
CustomerArray = new dynamic array of 4 by 7 int
Trace("Number of elements: " + TableauClient.Occurrence)
Syntax
<Result> = <Element used>.Count
<Result>: Integer
  • Total number of lines present in the specified List, Table, RepeatString or Combo field..
    WEBDEV - Browser code Result also available in browser code.
  • Number of elements found in the specified ListView control.
  • Number of rows found in the specified Table column.
  • Number of options found in the specified Check Box or Radio Button control.
  • Number of controls found in the specified group of controls.
  • Number of elements in a TreeView control.
  • Number of series in a Chart control.
  • Number of panes in a Tab control.
  • Number of elements in an array or associative array.
    WEBDEV - Browser code Result also available in browser code.
  • Number of elements in a queue, in a list or in a stack.
    New in version 2025
    WEBDEV - Browser code Result also available in browser code for queues and stacks.
  • Number of occurrences for an element of the associative array.
    WEBDEV - Browser code Result also available in browser code.
  • WEBDEV - Server codeWEBDEV - Browser code Number of files in an Upload control.
    WEBDEV - Server code The Count property must be used in the "Receive files uploaded from from..." process. In the other cases, this property returns 0.
  • WINDEVWINDEV Mobile Number of options in a menu.
  • WINDEV Number of elements in an Organization Chart control.
<Element used>: Type of element
Name of the element to use (WLanguage control or variable).
Remarks
WINDEVJavaUser code (UMC)PHP

Table control based on a data file with bouncing scrollbar

In a Table control based on a data file with a continuous scrollbar, the Count property returns the number of rows displayed in the Table control and not the number of records in the associated data file.
WINDEVWEBDEV - Server codeWEBDEV - Browser codeiPhone/iPadIOS WidgetJavaUser code (UMC)PHPAjax

Array and associative array

The Count property is used to:
  • Find out the number of elements in an array or in an associative array.
    Example:
    // Associative array of integers 
    // indexed on strings and with duplicates
    aaIDPerCustomer is associative array of int
    // Add the identifier of customer "A"
    aaIDPerCustomer["A"] = 55
    // Add the identifier of customer "B"
    aaIDPerCustomer["B"] = 321
    // Add the identifier of customer "A"
    aaIDPerCustomer["A"] = 56
    
    Trace("Nb elements : " + taIDParClient.Occurrence)
    // Displays 2 (ignores the duplicates)
  • Finding out the number of occurrences for an element in an associative array. This property is very useful for an associative array with duplicates.
    Example:
    // Associative array of integers 
    // indexed on strings and with duplicates
    aaIDPerCustomer is associative array of int
    // Add the identifier of customer "A"
    aaIDPerCustomer["A"] = 55
    // Add the identifier of customer "B"
    aaIDPerCustomer["B"] = 321
    // Add the identifier of customer "A"
    aaIDPerCustomer["A"] = 56
    
    Trace("Nb elements : " + taIDParClient["A"].Count)
    // Displays 1

Limit

The Count property applies only to:
  • List Box and ListView controls,
  • Table and TreeView Table controls,
  • Looper controls,
  • Combo Box controls,
  • TreeView controls,
  • Check Box controls,
  • Radio Button controls,
  • columns of Table controls, columns of TreeView Table controls,
  • Tab controls,
  • groups of controls,
  • Chart controls,
  • arrays, associative arrays,
  • queues, stacks and lists,
  • WINDEV TreeMap controls.
  • WEBDEV - Server codeWEBDEV - Browser code Upload controls.
  • WINDEVWINDEV Mobile menus.
  • WINDEV Organization Chart controls.
Java The Count property can only be used with the following elements:
  • Check Box controls.
  • Radio Button controls.
  • List Box controls.
  • Combo Box controls.
  • TreeView controls.
  • Tab controls.
  • Table controls.
  • column of Table controls.
  • queues, stacks and lists.
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/23/2024

Send a report | Local help