AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Canceling the sort
  • Sort
  • Looper bound to a data source and using a programmed iteration
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Allows you to:
  • Sort a Looper control according to one or more attributes.
  • Sort a Looper control on all its attributes.
  • Cancel a sort that was performed beforehand (which means ignore the sort).
Ejemplo
// Sort according to one of the Looper control attributes selected in a Radio Button control
SWITCH RADIO_RADIO1
	CASE 1: LooperSort_55("NAME")
	CASE 2: LooperSort_55("COMPANY")
	CASE 3: LooperSort_55("CITY")
END
// Sort by name (in ascending order) and by date (in descending order)
LooperSort("NAME" + TAB + "-DATE")
// Sort the LOOP_Customer Looper control on all its attributes (in descending order)
LooperSort("-LOOP_Customer")
// Cancels the sort that was performed in the LOOP_Customer Looper control
LooperSort("LOOP_Customer", False)
Sintaxis

Sorting a Looper control according to a list of attributes Ocultar los detalles

<Result> = LooperSort(<List of attributes>)
<Result>: Boolean
  • True if the sort was performed,
  • False otherwise.
<List of attributes>: Character string
Name of the attributes according to which the Looper control will be sorted (up to 10 attributes). This character string must have the following format:
"[<Direction>]<Attribute 1>" + TAB + "[<Direction>]<Attribute 2>" + TAB + ...
with:
  • <Sens> Sort direction (optional), can take the following values:
    • "+": sorting will be ascending (default value).
    • "-": sorting will be in descending order.
  • <Attribut>: name of the attribute used for sorting.

Sorting a Looper control or canceling a previous sort Ocultar los detalles

<Result> = LooperSort([<Direction>]<Looper> [, <Indicator>])
<Result>: Boolean
  • True if the sort was performed or canceled,
  • False otherwise.
<[<Direction>]<Looper>>: Character string
Name of the Looper control to sort.
  • If <Direction> is equal to "+", the Looper control will be sorted in ascending order (by default).
  • If <Direction> is equal to "-", the Looper control will be sorted in descending order.
<Indicator>: Optional boolean
  • True to perform the sort (default value),
  • False to cancel a sort that was performed beforehand.
Observaciones

Use conditions

La función LooperSort puede utilizarse en:
  • un control Looper basado en un archivo de datos,
  • un control Looper rellenado mediante programación.

Canceling the sort

Sort

The sort will be taken into account during the next addition of a row into the Looper control (LooperAdd, LooperAddLine, LooperInsert and LooperInsertLine).

Looper bound to a data source and using a programmed iteration

LooperSort does not work on a Looper control with the following characteristics:
  • Looper control bound to a data source,
  • Looper control that uses Recorrer mediante programación ("Content" tab in the control description window).
To change the display order of a Looper control with programmed iteration, you must adapt the code found in the different read processes of the Looper control (process for reading the first one, the next one, the previous one, ...).
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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