AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Characteristics of the row
  • Sort
  • Modifying a Looper control without attributes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Changes the values of the attributes in a row of a Looper control.
WINDEVWINDEV Mobile For Looper controls without attributes, it is recommended to directly change the value of the relevant controls. For more details, see Modifying a Looper control without attributes.
Example
// Modify a row in a Looper control
LOOP_Looper1.ModifyLine(Index, ProductName, ProductCode)
// Modifies a value in the Looper control at position 12
LOOP_Looper1.ModifyLine(12, LastName, FirstName, PhoneNum, FaxNum)
Syntax
<Looper control>.ModifyRow([<Index> [, <Value 1> [, <Value N>]]])
<Looper control>: Control name
Name of the Looper control to be used.
<Index>: Optional integer
Index of the row to be modified.
  • If this parameter is not specified, the modification will be performed on the current element.
  • A WLanguage error is displayed if <Index> is greater than the number of rows.
<Value 1>: Type of associated attribute (optional)
Value of the 1st attribute of the row that must be modified in the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
If none of these parameters is specified, <Looper>.ModifyLine assigns an empty string ("") or 0.
<Value N>: Type of associated attribute (optional)
Value of the Nth attribute of the row that must be modified in the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
If none of these parameters is specified, <Looper>.ModifyLine assigns an empty string ("") or 0.
Remarks

Use conditions

<Looper>.ModifyLine 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 <Looper>.ModifyLine can only be used in a Looper control populated programmatically.

Characteristics of the row

If a value corresponds to the result of a calculation, the numeric expression must be enclosed in brackets. For example:
ZR_CalculationZone.ModifyLine(5, (53+29), (83-21))

Sort

If <Looper>.ModifyLine modifies a sort attribute of the current Looper control, the sort order set with this attribute will be removed.

Modifying a Looper control without attributes

To modify a Looper control without attributes, it is recommended to directly change the value of the relevant controls.
For example:
// Modify the value of controls
// in "LOOP_Looper1" for row 23
LOOP_Looper1[23].LastNameControl = "Hobbes"
LOOP_Looper1[23].FirstNameControl = "Samantha"
Component: wd290obj.dll
Versión mínima requerida
  • Versión 23
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/06/2023

Señalar un error o enviar una sugerencia | Ayuda local