ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper functions
  • Use conditions
  • Adding an empty row
  • Row characteristics
  • Position of the new row
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a row at the end of a Looper control. The attributes of the new row may contain tabulations.
Example
// Initialize the Looper control named LOOP_LOOPER1
LooperDeleteAll(LOOP_LOOPER1)
HReadFirst(Product, ProdName)
WHILE HOut(Product) = False
LooperAddLine(LOOP_LOOPER1, Product.ProdName, Product.Code)
HReadNext(Product, ProdName)
END
Syntax

Adding a row to a Looper control with attributes Hide the details

<Result> = LooperAddLine(<Looper control> [, <Value 1> [... [, <Value N>]]])
<Result>: Integer
  • Number of the added row,
  • 0 if an error occurs.
<Looper control>: Control name
Name of the Looper control to be used.
If this parameter is an empty string (""), the row will be added in the current Looper control.
<Value 1>: Type of associated attribute (optional)
Value of 1st attribute for the new row.
The different values must be specified in the order of the attributes (Looper control description window).
If you don't want to specify a value for one of the attributes, use an empty string ("") or 0 (depending on the attribute type).
An empty row will be added if none of these parameters is specified.
<Value N>: Type of associated attribute (optional)
Value of Nth attribute for the new row.
The different values must be specified in the order of the attributes (Looper control description window).
If you don't want to specify a value for one of the attributes, use an empty string ("") or 0 (depending on the attribute type).
An empty row will be added if none of these parameters is specified.
Reports and Queries

Adding a row to a Looper control without attributes Hide the details

<Result> = LooperAddLine(<Looper control>)
<Result>: Integer
Number of the added row.
<Looper control>: Control name
Name of the Looper control to be used.
If this parameter is an empty string (""), the row will be added in the current Looper control.
Remarks

Use conditions

LooperAddLine can be used on:
  • a Looper control based on a data file,
  • a Looper control populated programmatically.

Adding an empty row

After adding an empty row, each attribute or control must be initialized individually.
For example:

Row characteristics

  • If a value is the result of a calculation, enclose the numerical expression in brackets.
    For example:
    LooperAddLine(LOOP_CalculationLooper, (53+29), (83-21))
  • Formatting attributes (e. g. color) that are not specified in the row display code are automatically reset.

Position of the new row

By default, the row is added at the end of the Looper control.
If the Looper control is sorted (LooperSort), the added row is positioned in the Looper control according to the current sort.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/23/2024

Send a report | Local help