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
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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
// Tri selon un des attributs du champ Zone répétée choisi dans un champ Sélecteur
SWITCH SEL_SELECT1
CASE 1: LooperSort("NOM")
CASE 2: LooperSort("SOCIETE")
CASE 3: LooperSort("VILLE")
END
// Tri par nom par ordre croissant et par date par ordre décroissant
LooperSort("NOM" + TAB + "-DATE")
// Tri du champ Zone répétée ZR_Client par ordre décroissant sur tous ses attributs
LooperSort("-ZR_Client")
// Annule le tri précédemment effectué sur le champ Zone répétée ZR_Client
LooperSort("ZR_Client", 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:
"[<Sens>]<Attribut 1>" + TAB + "[<Sens>]<Attribut 2>" + TAB + ...
where:
  • <Direction>: sort direction (optional), can take the following values:
    • "+": the sort will be performed in ascending order (default value).
    • "-": the sort will be performed in descending order.
  • <Attribute>: name of the attribute used for the sort.
WEBDEV - Código Navegador In browser code, the sort can be performed on a single attribute only.

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:
  • a control Looper basada en un archivo de datos,
  • a control Looper poblada programáticamente.
WEBDEV - Código Navegador Esta función no está disponible para los controles del looper lineal. Esta función está disponible para los controles Looper sólo en modo navegador.
WEBDEV - Código ServidorPHP Esta función está disponible para los controles del looper en modo Ajax, los controles del looper en modo clásico y los controles del looper lineal..

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 browse, 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: wd290obj.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: 23/12/2023

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