ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper functions
  • Use conditions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
LooperCount (Function)
In french: ZoneRépétéeOccurrence
Returns the number of rows in a Looper control.
Example
// Nombre de répétitions dans le champ Zone répétée "ZR_Zone1" ?
Résultat1 is int
Résultat1 = LooperCount(ZR_Zone1)
// Affiche le nombre de réponses trouvées : (ex : "Il y a 31 réponses")
LIB_LIBELLE1 = "Il y a " + LooperCount(ZR_ZoneResultat) + " réponses"
Syntax
<Result> = LooperCount(<Looper control> [, <Row/Attribute>])
<Result>: Integer
  • Number of rows found in a Looper control,
  • 0 if the Looper control is empty.
<Looper control>: Control name
Name of the Looper control to be used.
If this parameter corresponds to an empty string (""), the count will be performed on the current Looper control.
<Row/Attribute>: Optional constant
toColumnNumber of attributes found in the Looper control.
toShown
WEBDEV - Server code Default constant for a Looper control based on a data file.
Number of non-empty visible rows.
WEBDEV - Server codePHP This constant must not be used:
  • with Looper controls in AJAX mode.
  • with linear Looper controls.
WEBDEV - Browser code This constant is not available.
toTotal
(Default value)
WEBDEV - Server code Default constant for a Looper control populated programmatically.
Looper control based on a data file:
  • Total number of records:
    • in the linked data file (if there is no filter).
    • filtered in the linked data file (if there is a filter).
    • in the query (if the Looper control is linked to a query).
  • Number of visible records.
Warning the "End of initialization" event is only executed when the total has been calculated.
Looper control populated programmatically:
Total number of rows added by LooperAdd, LooperAddLine, LooperInsert or LooperInsertLine.
toVisibleNumber of visible rows (including the empty rows or the rows partially displayed). Corresponds to the maximum number of rows that can be displayed in the Looper control.
WEBDEV - Server codePHP This constant must not be used:
  • with Looper controls in AJAX mode.
  • with linear Looper controls.
WEBDEV - Browser code This constant is not available.
Remarks

Use conditions

LooperCount can be used on:
  • a Looper control based on a data file,
  • a Looper control populated programmatically.
WEBDEV - Browser code This function is not available for Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in AJAX mode, Looper controls in classic mode and Linear Looper controls.
PHP LooperCount can only be used on a Looper control populated programmatically.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help